I couldn't find that error message. However, I did find the following. Win32 Perl's code says:
switch(mode) {
case P_NOWAIT: /* asynch + remember result */
if (w32_num_children >= MAXIMUM_WAIT_OBJECTS) {
errno = EAGAIN;
ret = -1;
goto RETVAL;
}
which means that you can't spawn more than 64 children that you aren't going to immediately wait for.
This is so that emulation of wait/waitpid can be accomplished using
/* if a child exists, wait for it to die */
waitcode = WaitForMultipleObjects(w32_num_children,
w32_child_handles,
FALSE,
INFINITE);
where the w32_child_handles array is added to each time a "nowait" child is spawned.
Children are removed from this list when you wait/waitpid for them. Unfortunately, at least in Perl 5.6.0 and earlier, WNOHANG() is ignored by Win32 Perl's waitpid. In some ways, this is rather trivial to patch. But getting WNOHANG defined in all of the proper places is a bit of a pain.
If this is the source of your problem, than two work-arounds come to mind. First, you could use Win32::Process to create these children that you don't want to wait for. Second, you could use
system("start ...") to throw the "..." command into the background.
-
tye
(but my friends call me "Tye") |