From 5a4e647feb2a41dcc2a3d241dafd86cad0fbd477 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jan=20Kr=C3=BCger?= Date: Fri, 5 Nov 2010 03:26:49 +0100 Subject: [PATCH] jobd: when handling finished processes, ignore unstarted ones MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit When processes start and exit very quickly, the SIGCHLD handler can trigger warnings caused by 'running' jobs that haven't actually had their processes started yet. Make it ignore those. Signed-off-by: Jan Krüger --- jobd/jobd.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jobd/jobd.pl b/jobd/jobd.pl index caf1bcd..af9e964 100755 --- a/jobd/jobd.pl +++ b/jobd/jobd.pl @@ -110,7 +110,7 @@ sub handle_exit { sub handle_childgone { my $pid = wait; if ($pid != -1) { - my @child = grep { $_->{'pid'} == $pid } @running; + my @child = grep { $_->{'pid'} && $_->{'pid'} == $pid } @running; if ($?) { # XXX- we currently don't care } -- 2.11.4.GIT