Skip Menu |

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

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

People
Owner: Nobody in particular
Requestors: DROLSKY [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: Can't easily distinguish a child that exits with 0 from nothing having exited at all
The ->result and ->full_result methods return nothing if all the children have exited 0. They also return nothing if none of the children have exited. The only way to see if the children have _actually_ exited is to look at ->results or ->full_results. This is kind of annoying. It'd be nice if there was a simply way to get the status, zero or not.
Strongly agree. Newer IPC::Run doesn't let you just call 'results' either, since it calls _assert_finished which will die() if still busy. It'd be good to expose a: ->finished or similar, with similar semantics to ->result (no index = first child, otherwise n'th child). The docs don't mention how to tell whether a child or all children has exited at all. Even a minimal'finished' method like sub finished { my IPC::Run $self = $_[0]; return $self->{STATE} >= _finished; } would be helpful. It seems like the only "official" way at the moment is to poll "pumpable" until it returns false, but this isn't really documented either. Additional text for the perldoc for 'pumpable' like: To wait for a child process to exit during an event loop, test $h->pumpable until it returns false.
Ticket migrated to github as https://github.com/toddr/IPC-Run/issues/93