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:
parent
fa7a2de02c
commit
93b8af14da
|
@ -193,6 +193,16 @@ if ( !connect( CLIENT, $saddr ) )
|
||||||
$process->{keepalive} = !$final;
|
$process->{keepalive} = !$final;
|
||||||
kill( 'TERM', $process->{pid} );
|
kill( 'TERM', $process->{pid} );
|
||||||
delete( $cmd_hash{$command} );
|
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
|
sub stop
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue