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

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.

  • Comment on Re^3: question about running a system and a perl function background
  • Download Code

Replies are listed 'Best First'.
Re^4: question about running a system and a perl function background
by BrowserUk (Patriarch) on Dec 20, 2004 at 22:34 UTC

    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
Re^4: question about running a system and a perl function background
by ikegami (Patriarch) on Dec 20, 2004 at 22:22 UTC

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