Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: parent not waiting for child process

by dasgar (Priest)
on Aug 02, 2016 at 20:45 UTC ( [id://1169036]=note: print w/replies, xml ) Need Help??


in reply to parent not waiting for child process

If you're wanting to spawn a process and continue on without waiting plus collect data from the spawned process later, you could use threads. To do that, just start a thread that does the background process and your main code will continue on without waiting. And then you can join the thread(s) later to collect their return data.

However, if you're just wanting to spawn a process and are never concerned about ever checking on it, BrowserUk provided one method for doing so. I was not aware of that method, but I have successfully leveraged the start command available from the command prompt environment. It basically starts a new command prompt to run the desired command and then immediately returns. You can open a command prompt and type start /? to get details about the options for the start command.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others musing on the Monastery: (5)
As of 2024-04-19 05:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found