Skip Menu |

This queue is for tickets about the IPC-Run CPAN distribution.

Report information
The Basics
Id: 81928
Status: resolved
Priority: 0/
Queue: IPC-Run

People
Owner: Nobody in particular
Requestors: mf [...] 14v.de
Cc:
AdminCc:

Bug Information
Severity: Critical
Broken in:
  • 0.90
  • 0.92
Fixed in: (no value)



Subject: parent killed(?) if child exits early
Hi, there seems to be a race condition with using "run". If the child exits very quickly, the parent disappears. Example: use IPC::Run qw( run timeout ); my $in="\n"; my $out; my $err; print "calling run: "; run [ "sh", "-c", "exit 7" ], \$in, \$out, \$err, timeout(7); print "done\n"; Sometimes the parent survives, but most of the time the final "print" is not reached. With an additional delay everything works fine: use IPC::Run qw( run timeout ); my $in="\n"; my $out; my $err; print "calling run: "; run [ "sh", "-c", "sleep 1; exit 7" ], \$in, \$out, \$err, timeout(7); print "done\n";
From: mf [...] 14v.de
On Wed Dec 12 09:57:07 2012, m.f. wrote: Show quoted text
> Hi, > > there seems to be a race condition with using "run". If the child exits > very quickly, the parent disappears.
platform info: Ubuntu 12.04 x64: perl 5.14.2, IPC::Run 0.90 SuSE 10.0 i586: perl 5.8.8, IPC::Run 0.92
Ticket migrated to github as https://github.com/toddr/IPC-Run/issues/49