Using fclose() instead of close() means future fprintf() doesn't kill us on Mac.
This commit is contained in:
@@ -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 */
|
||||||
|
|||||||
Reference in New Issue
Block a user