Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re^6: Get the process id, and output of a process, in a threaded environment

by rmahin (Beadle)
on Sep 07, 2013 at 03:50 UTC ( #1052796=note: print w/ replies, xml ) Need Help??


in reply to Re^5: Get the process id, and output of a process, in a threaded environment
in thread Get the process id, and output of a process, in a threaded environment

Darn, I was hoping you would have better news!

The only solution that I could come up with was basically your first solution, and would basically write a perl script and open that with a pipe. This script would do the required SETS, open the process that we can now get the actual pid from, and print the pid as the first line, something along the lines of PID=<pid>, which is just what you described.

Far from an elegant solution, but it was the only one I saw.

As for your second solution, I'm with you not having idea of if its possible, and something tells me getting it to work on all *nix environments AND windows, would be a nightmare.

As always, thanks for taking a look!


Comment on Re^6: Get the process id, and output of a process, in a threaded environment

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1052796]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (9)
As of 2014-12-17 20:56 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (33 votes), past polls