in reply to open3() problem
OK, I can make the question less vague now.
By chance, another recent question set me thinking about my use of open3().
So I toyed with the code a bit, and found something that makes a difference.
The original code is
... setpgrp(0,0); sub killgroup { # Make sure all child processes are killed too. my $sig = shift; local $SIG{$sig} = 'IGNORE'; # don't kill ourselves again $Interrupted = 1; kill($sig, -$$); }; local $SIG{INT} = \&killgroup; local $SIG{QUIT} = \&killgroup; local $SIG{ABRT} = \&killgroup; local $SIG{TERM} = \&killgroup; local *CATCHERR = IO::File->new_tmpfile; my $pid = open3(gensym, \*CATCHOUT, ">&CATCHERR", "$cmd $args"); ...
If I comment out the four lines beginning local $SIG, then it works just like it used to.
Has something changed in Perl since 5.10.1 that would affect this?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Vague segfault question
by ikegami (Patriarch) on Feb 03, 2012 at 19:47 UTC | |
by ChrisDennis (Sexton) on Feb 04, 2012 at 13:04 UTC | |
by Anonymous Monk on Feb 04, 2012 at 14:38 UTC | |
by ChrisDennis (Sexton) on Feb 05, 2012 at 21:07 UTC | |
by Anonymous Monk on Feb 06, 2012 at 08:58 UTC |