-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error in Windows 7 Prof x64 (Don't know how to wait on $objects[0]...) #16
Comments
Still valid for Strawberry perl 5.22.1.1 64bit on windows 8.1 |
Still happening in 0.12 under Strawberry Perl 5.22.2 32bit etc on Windows 7(32bit). I think that it is caused by an autovivification in line 212 of Simple.pm. This patch might be helpful. P.S.
(1) Filesys::Notify::Simple watches all files and directories directly under c:\work. (2) "plackup -r" will not function why.
Hope this help. Thank you, -- |
Hey @twata1, could you test my pull request #23 if this fixes your issue too? IMO there is a deeper problem with the windows file watcher, as it can only watch whole directories. Therefore we need to filter "unwanted" events in case we watch specific files. Which is what my PR does. I have successfully tested it against perl-libsass watcher on linux and windows. |
Hi, @mgreter I tested #23. [Test environment] [Test files and directory] [Test]
modified aaa.txt.
Certainly, the following message disappeared. |
Hi @twata1, you're probably facing https://curiousprogrammer.wordpress.com/2010/03/22/plack-auto-restart/ - fork/signal handling (which plack uses) work very different on windows (the negative pid indicates that it is indeed a thread and not a forked process). Seems the fix to send a KILL signal ( |
Hi @mgreter Thank you for the information. I applied the patch above and tested #23
modified aaa.txt.
But, after updating the aaa.txt, I visit http://127.0.0.1:5000/hello.psgi in the browser, I can't receive a response. Anyway, thank you for the information! |
Looks like one of the implications of just killing the child thread holding the listening socket. The only crude workaround would probably be to exit the main process too and just restart plackup with a batch file: :while
call plackup -r hello.psgi
if %errorlevel% == 1 goto :while my $pid = $self->{pid} or return;
warn "Killing the existing server (pid:$pid)\n";
kill 'TERM' => $pid;
+
+ if ( $^O eq 'MSWin32') {
+ sleep 1;
+ kill 'KILL' => $pid;
+ waitpid($pid, 0);
+ exit 1;
+ }
+
waitpid($pid, 0);
} BTW: Sorry all that we highjacked this thread ;) |
I'm sorry too.
with patched Restarter.pm(Plack-1.0044-Plack-Loader-Restarter-Win32.patch.txt). Finally, I found: Crude Win32 development restarter and server-restarter.pl works fine. |
So, I wanted to test #23 without using plack. [Test environment] [Test files and directory]
[Test]
Certainly, the following message disappeared from above output. modified body.sass
Certainly, I confirmed body.css was compiled. Thank you, |
Don't know how to wait on $objects[0] at C:/Perl64/site/lib/Filesys/Notify/Simple.pm line 135.
and as the consequence Plackup can't watch for project's directory with key's "-r" and "-R".
The text was updated successfully, but these errors were encountered: