in reply to Windows + Win32::OLE + fork = Hell

On win32, system is far simpler to use than fork followed by exec. Eg:

my $pid = system 1, "/path/to/the/command.exe arg1 arg2";

Note: the first parameter '1', it causes the command to be run asynchronously, and the pid returned is a real pid.

This does have limitations. If your command involves shell characters, (io redirection etc.) then a cmd.exe session will be started and your command will be run within that which works fine except that the pid returned will be for cmd.exe and killing that will not kill the executable started from it.


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.
"Too many [] have been sedated by an oppressive environment of political correctness and risk aversion."