Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

(MeowChow) Re3: 65 is the magic number!

by MeowChow (Vicar)
on May 14, 2002 at 04:28 UTC ( #166369=note: print w/ replies, xml ) Need Help??


in reply to Re: (MeowChow) Re: 65 is the magic number!
in thread 65 is the magic number!

Forking under Win32 is emulated; a child process is not actually created. That's probably why the fd's are not going away. See perlfork.

   MeowChow                                   
               s aamecha.s a..a\u$&owag.print


Comment on (MeowChow) Re3: 65 is the magic number!
Re: (MeowChow) Re3: 65 is the magic number!
by Declarent (Sexton) on May 14, 2002 at 04:40 UTC

    True, it's really just ithreads. So, that being the case is there no way to drop an FD once you're done with it? Since the server is running in the primary thread, is the only way to drop all those handles to drop the server? Ack.

    I'd also be happy to use spawn or process::create, but those seem to only work on external executables and not something inside the original code.

    If I only had the option of running on my AIX box, I'd be a happy camper, but this is win32 only.

    D

      No, that's not quite what I meant. You should be able to drop the handle, but I'm guessing that your code was written with the assumption that descriptors were shared rather than dup'd, so you only closed one, and not the other.
         MeowChow                                   
                     s aamecha.s a..a\u$&owag.print
Re: (MeowChow) Re3: 65 is the magic number!
by Declarent (Sexton) on May 14, 2002 at 05:01 UTC

    Hmm, I don't think I'm following you.

    Lemme see:

    I'm forking, then opening a handle inside the 'child'. After I'm done processing, I'm closing the child only handle. Then I'm exiting the child (or join in ithreads I guess).

    That being the case, the handle shouldn't exist in the original thread. I think.

    And sadly, I can't close the original thread, as it's the server itself. I can get the FD number with fileno(), so I might try an explicit close.

    D

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://166369]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (1)
As of 2014-10-25 04:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    For retirement, I am banking on:










    Results (141 votes), past polls