http://qs321.pair.com?node_id=605717


in reply to Problem with 'system' function in Windows Vista

I keep forgetting what system(1, @command) does. (it's windows specific, right?)

If you're trying to run and wait for the the command to exit, have you tried using system(@command) instead?

  • Comment on Re: Problem with 'system' function in Windows Vista

Replies are listed 'Best First'.
Re^2: Problem with 'system' function in Windows Vista
by ikegami (Patriarch) on Mar 20, 2007 at 17:48 UTC

    system(1, ...) is a Windows extention to create a process that runs asynchronously. It's an alternative to fork+exec. Unlike fork, system(1, ...) is natively supported, so it's much more resilient.

Re^2: Problem with 'system' function in Windows Vista
by jdtoronto (Prior) on Mar 20, 2007 at 17:46 UTC
    Hi Joost,

    The

    I keep forgetting what system(1, @command) does. (it's windows specific, right?)
    Is Windows specific, it is meant to give a non-blocking system call - it gets the result of the creation of the child process and returns it. I have also tried it without the 1, works as expected and gives the same error.

    jdtoronto