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")

In reply to (tye)Re: 'can't spawn nowait' by tye
in thread 'can't spawn nowait' by compualley

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.