Win32's Perl 5.6.1 does have an emulated fork(), though. Is there something wrong with that?
Yup.
If you try to fork and "spawn" off a bunch of system() calls, you get "Resource temporarily unavailable" after some fairly small number of forks (maybe 20?). With Win32::Process::CreateProcess, you don't run into that problem.
--
Mike | [reply] |
| [reply] |
will the parent process have to wait until the child complete?
| [reply] |
| [reply] |
I've never had much luck with ActiveState's fork. I don't even consider using it when I'm on win32. Most of my problems have been related to sockets. When a daemon accepts a connection and forks off, the socket doesn't have anything to say until the process dies. A socket that doesn't pass data isn't much use to me.
So I just keep the servers on the servers on client stuff like this on my workstation.
This code is more usefull for launching perl code without a dos window though, and that's why I wrote it. With this you don't have to bother hiding your dos parent in your code, it's already gone. | [reply] |