]> arthur.barton.de Git - ngircd-alex.git/blobdiff - src/ngircd/ngircd.c
fix Config_Error_NaN prototype (first argument missed "const")
[ngircd-alex.git] / src / ngircd / ngircd.c
index 0378856a5d8c1235e246480d0d4d05b20428d225..263c3a542e597d69126623d6cae196ac29a3b5dd 100644 (file)
@@ -14,7 +14,7 @@
 
 #include "portab.h"
 
-static char UNUSED id[] = "$Id: ngircd.c,v 1.92 2005/02/10 13:09:11 alex Exp $";
+static char UNUSED id[] = "$Id: ngircd.c,v 1.94 2005/02/11 13:52:37 alex Exp $";
 
 #include "imp.h"
 #include <assert.h>
@@ -580,8 +580,8 @@ Show_Help( VOID )
        puts( "  -d, --debug        log extra debug messages" );
 #endif
        puts( "  -f, --config <f>   use file <f> as configuration file" );
-        puts( "  -n, --nodaemon     don't fork and don't detach from controlling terminal" );
-        puts( "  -p, --passive      disable automatic connections to other servers" );
+       puts( "  -n, --nodaemon     don't fork and don't detach from controlling terminal" );
+       puts( "  -p, --passive      disable automatic connections to other servers" );
 #ifdef SNIFFER
        puts( "  -s, --sniffer      enable network sniffer and display all IRC traffic" );
 #endif
@@ -646,18 +646,13 @@ Setup_FDStreams( VOID )
        if ( fd < 0 ) return;
 
        /* Close "old" stdin/out/err descriptors */
-       fclose( stdin ); fclose( stdout ); fclose( stderr );
+       close( 0 ); close( 1 ); close( 2 );
 
        /* Create new stdin(0), stdout(1) and stderr(2) descriptors */
        dup2( fd, 0 ); dup2( fd, 1 ); dup2( fd, 2 );
 
        /* Close newly opened file descriptor if not stdin/out/err */
        if( fd > 2 ) close( fd );
-
-       /* Assign FILE handles for stdin/out/err */
-       stdin = fdopen( 0, "r" );
-       stdout = fdopen( 1, "w" );
-       stderr = fdopen( 2, "w" );
 } /* Setup_FDStreams */