Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re^2: question about running a system and a perl function background

by ikegami (Patriarch)
on Dec 03, 2004 at 06:20 UTC ( [id://412052]=note: print w/replies, xml ) Need Help??


in reply to Re: question about running a system and a perl function background
in thread question about running a system and a perl function background

system 1, is Windows specific fork+exec that works better than fork+exec on Windows. By switching to fork+exec, you've taken a step backwards. system 1, returns the child's pid, so I think your solution could be rewritten to use system 1,.

Replies are listed 'Best First'.
Re^3: question about running a system and a perl function background
by graff (Chancellor) on Dec 03, 2004 at 13:38 UTC
    system 1, is Windows specific fork+exec that works better than fork+exec on Windows.
    Ah. I was actually wondering about that -- I had never seen "system 1," before and wasn't even sure whether it was a mistake. (I'm blissfully ignorant of most of the Windows-specific extensions to Perl.) Thanks.
Re^3: question about running a system and a perl function background
by Anonymous Monk on Dec 20, 2004 at 22:02 UTC
    Hello,

    Is  system 1, supposed to return the child's pid? It seems to return -1 when I tested it out. Is there any other windows command that might return the child's pid?

    Thanks for the response.

      The "piped open" (See perlopentut) returns the pid of the child process.

      See also Re^5: question about running a system and a perl function background in this thread for an example of use.


      Examine what is said, not who speaks.        The end of an era!
      "But you should never overestimate the ingenuity of the sceptics to come up with a counter-argument." -Myles Allen
      "Think for yourself!" - Abigail        "Time is a poor substitute for thought"--theorbtwo         "Efficiency is intelligent laziness." -David Dunham
      "Memory, processor, disk in that order on the hardware side. Algorithm, algorithm, algorithm on the code side." - tachyon

      I believe it should. Have you tried printing "$!" and/or "$^E"? They may give you a meaning the cause of the error.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (4)
As of 2025-05-19 14:26 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.