useopenid has asked for the wisdom of the Perl Monks concerning the following question:
#!/usr/bin/perl use strict; my $stuff_cmd = 'sleep 10'; my $cam_fh; my $cam_pid = open($cam_fh, "$stuff_cmd|"); print "cmd running: $cam_pid\n"; sleep 1; print "killing cmd: $cam_pid\n"; while ((my $count = kill -9, $cam_pid) != 1) { print "It's alive!!!!!\n"; sleep 1; } print "cmd closed off\n"; close($cam_fh); print "dead and buried!\n"; exit 0;
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: kill won't kill the process I opened
by keszler (Priest) on Sep 16, 2013 at 03:34 UTC | |
Re: kill won't kill the process I opened
by kcott (Archbishop) on Sep 16, 2013 at 03:43 UTC | |
Re: kill won't kill the process I opened
by useopenid (Initiate) on Sep 16, 2013 at 03:33 UTC | |
Re: kill won't kill the process I opened
by Anonymous Monk on Sep 16, 2013 at 03:40 UTC |