Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris

Re: Does syscall wait for the command to finish?

by hbo (Monk)
on Jun 20, 2004 at 02:55 UTC ( #368227=note: print w/replies, xml ) Need Help??

in reply to Does syscall wait for the command to finish?

If system sees shell metacharacters in the string it is given, in invokes a shell to do the work. (Otherwise it exec's the command directly.) You can therefore do stuff like: perl -e 'system("sleep 20&");print "Hi\n";' and you will see "Hi" right away. There are lots of other possibilities for asynchronous job control with Perl. There are man pages for perlfork and perlipc that are helpful. The latter contains a discussion of the "forking form of open()" that is another way to get asynchronous command execution.
  • Comment on Re: Does syscall wait for the command to finish?

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://368227]
[stevieb]: I'm working on hiding the fact the software needs MetaCPAN::Client, as I often have a hell of a time installing it. I'm going to change it to let the user know if they do revdep that it needs to be installed, and remove that distribution ..
[stevieb]: ...from being a prereq

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (3)
As of 2017-06-25 23:42 GMT
Find Nodes?
    Voting Booth?
    How many monitors do you use while coding?

    Results (572 votes). Check out past polls.