Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re^2: Counting open files?

by Eyck (Priest)
on Jun 22, 2005 at 11:01 UTC ( [id://468965]=note: print w/replies, xml ) Need Help??


in reply to Re: Counting open files?
in thread Counting open files?

Have you ever used any libraries?

If you have, then how do you know what fds it opens? If you answer that, then you have answered my question.

Replies are listed 'Best First'.
Re^3: Counting open files?
by derby (Abbot) on Jun 22, 2005 at 14:38 UTC
    Hmmm ... what version of perl and what OS are you using? The normal behaviour for exec is to close all file descriptors from SYSTEM_MAX_FD+1 to however many you have open. I can envision only a few ways for this error to happen.
    • Your os does not support close-on-exec
    • the code has gone out of it's way to clear the close-on-exec flag
    • $^F was munged (SYSTEM_MAX_FD - normally set to 2 because you normally want stdin, stdout and stderr passed across exec)
    • the code is re-opening stdin, stdout, stderr without first closing them
    -derby
Re^3: Counting open files?
by mrborisguy (Hermit) on Jun 22, 2005 at 12:38 UTC

    Knowing what libraries you have are using would help us help you.

    Most well-written libraries that open files probably should have a method of closing those files as well.

        -Bryan

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others chanting in the Monastery: (5)
As of 2024-03-28 06:46 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found