[Israel.pm] Exit code and pid in one.

Tal Kelrich tal at musicgenome.com
Tue Jun 15 01:52:14 PDT 2004

On Tue, 15 Jun 2004 11:07:23 +0300
Thomas Maier <hayzer at 012.net.il> wrote:

> Hi All,
> If I spawn a process from perl, and I need both its PID and the return
> value, is there a straight-forward way (no fork involved)?
> system gets the exit code, open ___|-___ returns the PID.
> How can I get them both at once?
> Thanks ahead,
> Thomas.

I would try using waitpid to get the status.

Tal Kelrich
PGP fingerprint: 3EDF FCC5 60BB 4729 AB2F  CAE6 FEC1 9AAC 12B9 AA69
Key Available at: http://www.hasturkun.com/pub.txt
The static electricity routing is acting up...
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://perl.org.il/pipermail/perl/attachments/20040615/3c665d37/attachment.pgp 

More information about the Perl mailing list