On Thursday 23 August 2001 20:20, Gupta, Ashish wrote:
> I open lots of file descriptors in a script.
> At one point,  I want to close all the opened file descriptors (except for
> stdin, stdout, stderr).
> Is there a way to close all the opened file descriptors without having a
> list of the handles ?

Well, I don't know of any specific function to close all filehandles at once. 
 You could:

1) Keep track of them in an array, loop through the array and close them all 
individually.

2) Do nothing and let them close automatically at the end of the program's 
run.

Do you really need to open so many?  I find I get confused if I have more 
than three or so files open and actively in use at the same time.  Then 
again, I have a short attention span.

Regards,

Troy


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to