Added kill -9 on stop after 5 seconds.

git-svn-id: http://svn.zoneminder.com/svn/zm/trunk@155 e3e1d417-86f3-4887-817a-d78f3d33393f
This commit is contained in:
stan 2002-12-10 12:35:59 +00:00
parent fa7a2de02c
commit 93b8af14da
1 changed files with 10 additions and 0 deletions

View File

@ -193,6 +193,16 @@ if ( !connect( CLIENT, $saddr ) )
$process->{keepalive} = !$final;
kill( 'TERM', $process->{pid} );
delete( $cmd_hash{$command} );
# Now check it has actually gone away, if not kill -9 it
my $count = 0;
while( kill( 0, $process->{pid} ) )
{
if ( $count++ > 5 )
{
kill( 'KILL', $process->{pid} );
}
}
}
sub stop
{