McMahon has asked for the
wisdom of the Perl Monks concerning the following question:
Windows has no fork(). Various languages have implemented threads on Windows with varying degrees of success.
But Perl is the only language I've come across that has anything like system(1,"blah") that returns control to the calling Perl script on Windows. It doesn't seem like it would be possible, but it works flawlessly as far as I can tell.
I find myself writing and running scripts in a number of languages, but whenever I need a controller for more than one script, regardless of language, I turn to Perl because of system(1,"xyz").
When people ask me how it works, though, I have to just say "magic". I've recently started using it again in some controller scripts, and now I feel like I should find out what's really going on.
So -- how does system(1,"foo") work on Windows?