Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

synopsis of IPC::Open3

by ennuikiller (Acolyte)
on Feb 28, 2011 at 14:52 UTC ( [id://890568]=perlquestion: print w/replies, xml ) Need Help??

ennuikiller has asked for the wisdom of the Perl Monks concerning the following question:

Can someone explain the following lines of the IPC::Open3 synopsis:
$pid = open3(\*CHLD_IN, \*CHLD_OUT, \*CHLD_ERR, 'some cmd a +nd args', 'optarg', ...); use Symbol 'gensym'; $err = gensym;
I am using open3 to execute a shell command but I am getting a "fork: resource temporarily unavailable error" and I believe it may be due to not using these lines in my open3 routine. Any insight would be very much appreciated!

Replies are listed 'Best First'.
Re: synopsis of IPC::Open3
by salva (Canon) on Feb 28, 2011 at 15:23 UTC
    Let us really help you posting your program code!

    Anyway, try using strace to discover what is going wrong at the OS level.

Re: synopsis of IPC::Open3
by ikegami (Patriarch) on Feb 28, 2011 at 16:57 UTC
    \*CHLD_ERR and $err = gensym are two ways of creating a file handle to pass to open3. It makes no sense to use both. And it's not the cause of your problem.
      My educated guess is that the OP has accidentally written a fork bomb, and is noticing the error message from running out of processes.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://890568]
Approved by ww
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others learning in the Monastery: (2)
As of 2024-04-25 06:32 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found