Parent Directory | Revision Log | Patch
revision 1.68 by martinp, Wed Jul 23 07:04:28 2003 UTC | revision 1.69 by martinp, Wed Jul 23 08:23:12 2003 UTC | |
---|---|---|
# | Line 1040 void redirect_stdfd() { | Line 1040 void redirect_stdfd() { |
1040 | void fd_close() { | void fd_close() { |
1041 | ||
1042 | int i; | int i; |
int max_descriptors = 1024; | ||
1043 | #ifdef HAVE_UNISTD_H | #ifdef HAVE_UNISTD_H |
1044 | max_descriptors = getdtablesize(); | int max_descriptors = getdtablesize(); |
1045 | #else | |
1046 | int max_descriptors = 1024; | |
1047 | #endif | #endif |
1048 | ||
1049 | for(i = 3; i < max_descriptors; i++) | for(i = 3; i < max_descriptors; i++) |
1050 | (void) close(i); | (void) close(i); |
1051 | errno= 0; | errno= 0; |
|
savannah-hackers-public@gnu.org | ViewVC Help |
Powered by ViewVC 1.1.26 |