Using fclose() instead of close() means future fprintf() doesn't kill us on Mac.

This commit is contained in:
Keith Winstein
2012-04-15 18:00:01 -04:00
parent f376b80018
commit 7103c5f48b
+3 -3
View File
@@ -310,9 +310,9 @@ int run_server( const char *desired_ip, const char *desired_port,
/* close file descriptors */ /* close file descriptors */
if ( !verbose ) { if ( !verbose ) {
/* Necessary to properly detach on old versions of sshd (e.g. RHEL/CentOS 5.0). */ /* Necessary to properly detach on old versions of sshd (e.g. RHEL/CentOS 5.0). */
close( STDIN_FILENO ); fclose( stdin );
close( STDOUT_FILENO ); fclose( stdout );
close( STDERR_FILENO ); fclose( stderr );
} }
/* Fork child process */ /* Fork child process */