Created
August 3, 2010 13:01
-
-
Save nihen/506332 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git lib/Plack/Loader/Restarter.pm lib/Plack/Loader/Restarter.pm | |
index 4a79bbd..f4051be 100644 | |
--- lib/Plack/Loader/Restarter.pm | |
+++ lib/Plack/Loader/Restarter.pm | |
@@ -23,6 +23,8 @@ sub watch { | |
sub _fork_and_start { | |
my($self, $server) = @_; | |
+ $self->{pid} = undef; | |
+ | |
my $pid = fork; | |
die "Can't fork: $!" unless defined $pid; | |
@@ -76,6 +78,7 @@ sub run { | |
$self->_kill_child; | |
$self->_fork_and_start($server, $builder); | |
+ return unless $self->{pid}; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment