in reply to Re: Open pipe and fork or system command to retrieve PID and exit status - Best approach?
in thread Open pipe and fork or system command to retrieve PID and exit status - Best approach?

Sorry, wrong definition from me - I meant Return Status and PID.

ie. -1 or 0 or 127 etc. and if 0, the PID as well.

I am really trying to find most suitable approach to fork, and /most reliably/ work with PID obtained, over a period of time, and different script executions. So far I have decided to fork, exec, and in essence use

 do_something() if kill 0, $PID
  • Comment on Re^2: Open pipe and fork or system command to retrieve PID and exit status - Best approach?
  • Download Code