Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re^3: How to close all open file descriptors after a fork?

by blazar (Canon)
on Jul 19, 2005 at 14:50 UTC ( #476135=note: print w/ replies, xml ) Need Help??


in reply to Re^2: How to close all open file descriptors after a fork?
in thread How to close all open file descriptors after a fork?

No they won't. Your array will still hold a copy and they all will be kept open.
I meant: "in a general situation". In this particular one I suggested to explicitly close the entries kept in the array. I also included a footnote mentioning the ref thing.
These file handles are references, are they not? You could try weaken these references in the array, and they'll automatically go away as normal — leaving just an undef in place.
This is a very interesting suggestion, although I have no experience myself weakening references. I won't try because this is not my problem, but I will keep it in mind for when it may be of some use for me...
Comment on Re^3: How to close all open file descriptors after a fork?

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (4)
As of 2016-05-28 02:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?