system() with timeout
Chisel Wright
chisel at herlpacker.co.uk
Fri Apr 17 12:04:46 BST 2009
On Fri, Apr 17, 2009 at 11:25:54AM +0100, Matt Lawrence wrote:
> I haven't had a chance to test any of this on the latest perl, 5.8.8 is
> the latest I've tried it with.
Odd, I'm on 5.8.8 and don't seem to be seeing the same behaviour:
$ perl sigdie.pl &
[1] 14327
$ ps -Fp 14327
UID PID PPID C SZ RSS PSR STIME TTY TIME CMD
cwright 14327 1335 99 1097 1436 0 12:01 pts/11 00:00:08 perl sigdie.pl
...
$ ps -Fp 14327
UID PID PPID C SZ RSS PSR STIME TTY TIME CMD
cwright 14327 1335 98 1097 1436 0 12:01 pts/11 00:00:53 perl sigdie.pl
Oooh, but interestingly, if I chmod the script and run it:
$ chmod 0755 sigdie.pl
$ ./sigdie.pl &
[1] 14421
$ ps -Fp 14421
UID PID PPID C SZ RSS PSR STIME TTY TIME CMD
cwright 14421 1335 94 3404 10384 0 12:03 pts/11 00:00:06 /usr/bin/perl ./sigdie.pl
...
$ ps -Fp 14421
UID PID PPID C SZ RSS PSR STIME TTY TIME CMD
cwright 14421 1335 98 12863 48308 0 12:03 pts/11 00:00:35 /usr/bin/perl ./sigdie.pl
--
Chisel Wright
e: chisel at herlpacker.co.uk
w: http://www.herlpacker.co.uk/
You're the font of all knowledge?
It's just a shame someone pulled the plug.
More information about the london.pm
mailing list