in reply to Re: Parallel downloading under Win32?
in thread Parallel downloading under Win32?

I don't understand 'system' very well. The manual says that system makes the parent process wait for completion, which sounds to me like what backticks do. If that's the case, that's not exactly parallel.

If I'm misunderstanding that and it makes it run parallel, I fail to see how i can check for feedback, as perldoc doesn't mention any return of a handle or any sort of access to information about whether the task is still running. How would i know when it's done and what its success was?
  • Comment on Re^2: Parallel downloading under Win32?

Replies are listed 'Best First'.
Re^3: Parallel downloading under Win32?
by ikegami (Patriarch) on Apr 29, 2009 at 12:16 UTC
      I'm amazed that that kind of information is not in the description of the command itself. Anyhow, that being a Win32-specific thing means it's useless for me, as i don't want to lose Linux compatibility.

        Officially, it's an internal call you're suppose to access through modules such as IPC::Open2 and IPC::Open3, both of which are documented and portable.

        But yeah, nothing about "1," makes any sense potato.

Re^3: Parallel downloading under Win32?
by syphilis (Archbishop) on Apr 29, 2009 at 12:27 UTC
    How would i know when it's done and what its success was?

    Sounds like you want to launch these processes with Win32::Process's Create() function instead of system().

    Cheers,
    Rob
      Good suggestion, certainly a more sensible approach than system, but not really applicable for me. While I want this to be able to run under Win32, i do not want to lose ability to run it under Linux.
        While I want this to be able to run under Win32, i do not want to lose ability to run it under Linux

        That might make it more messy. Assuming that the code that works on linux *doesn't* work on windows, you could resort to something like:
        if($^O =~ /mswin32/i) { require Win32::Process; # do the task using Win32::Process } else { # do the task using whatever it is that works on linux }
        As an alternative, you may find that the code that works on linux also works on windows if run under Cygwin. Is using Cygwin an option ?

        Cheers,
        Rob