mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-24 04:13:28 +01:00
Fix an fd leak in start_daemon
svn:r4508
This commit is contained in:
parent
8fd197c687
commit
584a0ae397
@ -1418,6 +1418,8 @@ void finish_daemon(const char *desired_cwd)
|
||||
log_fn(LOG_ERR,"dup2 failed. Exiting.");
|
||||
exit(1);
|
||||
}
|
||||
if (nullfd > 2)
|
||||
close(nullfd);
|
||||
write(daemon_filedes[1], &c, sizeof(char)); /* signal success */
|
||||
close(daemon_filedes[1]);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user