in reply to Re^5: Using Proc::Background and Win32
in thread Using Proc::Background and Win32

But back to the Win32::Process, does anyone think this would be better to use then using the system command

The bottom line is that all of them -- including system which ends up calling win32_spawnvp() in Win32.c -- use the OS call CreateProcess().

What distinguishes them, is the preprocessing of the arguments and command strings, prior to calling CreateProcess(), and in that respect, system does it better than all of the others.


With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.

Replies are listed 'Best First'.
Re^7: Using Proc::Background and Win32
by mmartin (Monk) on Oct 21, 2013 at 16:58 UTC
    Hey BrowserUK, thanks for the reply!

    Ok cool, thanks for the clarification...

    I guess I'll save myself the headache and use that system command that you posted, which you
    suggested I try.

    Which was this one here:
    Perl> $pid = system 1, 'perl', '-E"sleep 20; say q[done]"';; Perl> print kill 0, $pid while sleep 1;;


    Since the command seems to work without any problems and I can check on it's progress, then that's
    good enough for me!


    Thanks Again for the help, very much appreciated!


    Thanks,
    Matt