[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: closing file descriptors
From: |
Martin Pala |
Subject: |
Re: closing file descriptors |
Date: |
Sat, 28 Sep 2002 16:02:02 +0200 |
Its for security purpose - you can read about it for example in this guide:
http://www.suse.com/us/private/support/howto/secprog/index.html.
Btw. - maybe it can be better to get the number of filedescriptors from the
system, instead of using '1024' constant. On lot of servers is needed much
higher filedescriptors number (for example database servers, etc.) In above
mentioned guide is piece of code that address similar thing.
Martin
----- Original Message -----
From: <address@hidden>
To: <address@hidden>
Sent: Saturday, September 28, 2002 6:32 AM
Subject: closing file descriptors
> This piece of code bothers me in env.c:
>
>
> /*
> * Require that the other file descriptios are closed. Should we use
> * sysconf() or getdtablesize() or getrlimit() or...
> */
> for(i = 3; i < 1024; i++)
> (void) close(i);
> errno= 0;
>
>
> I don't understand why this is done.
>
>
>
>
> --
> To unsubscribe:
> http://mail.freesoftware.fsf.org/mailman/listinfo/monit-general
>
- RE: toggle feature, (continued)
- RE: toggle feature, Rory Toma, 2002/09/27
- RE: toggle feature, Jan-Henrik Haukeland, 2002/09/27
- RE: toggle feature, Rory Toma, 2002/09/27
- RE: toggle feature, Jan-Henrik Haukeland, 2002/09/27
- RE: toggle feature, rory, 2002/09/28
- RE: toggle feature, Jan-Henrik Haukeland, 2002/09/28
- RE: toggle feature, rory, 2002/09/28
- RE: toggle feature, Jan-Henrik Haukeland, 2002/09/28
- RE: toggle feature, rory, 2002/09/28
- closing file descriptors, rory, 2002/09/28
- Re: closing file descriptors,
Martin Pala <=