]> git.sur5r.net Git - openldap/blobdiff - clients/gopher/detach.c
Changed FD_SETSIZE checks for consistency. Added checks where needed.
[openldap] / clients / gopher / detach.c
index f543cc30604d03e95ce7e18d824bf761121b2678..09997c129814db3117f303278080437ad51b1cec 100644 (file)
@@ -33,6 +33,13 @@ int  debug;
        nbits = getdtablesize();
 #endif /* USE_SYSCONF */
 
+#ifdef FD_SETSIZE
+       if (nbits > FD_SETSIZE) {
+               nbits = FD_SETSIZE;
+       }
+#endif /* FD_SETSIZE*/
+
+
        if ( debug == 0 || !(isatty( 1 )) ) {
                for ( i = 0; i < 5; i++ ) {
                        switch ( fork() ) {