mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-12-06 19:41:15 +01:00
r16689@tombo: nickm | 2008-07-03 11:03:14 -0400
Fix for bug 742: do not use O_CREAT on 2-option version of open(). Especially do not use it on /dev/null. Fix from Michael Scherer. Bugfix on 0.0.2pre19 (wow). svn:r15626
This commit is contained in:
+1
-2
@@ -3084,8 +3084,7 @@ finish_daemon(const char *desired_cwd)
|
||||
exit(1);
|
||||
}
|
||||
|
||||
nullfd = open("/dev/null",
|
||||
O_CREAT | O_RDWR | O_APPEND);
|
||||
nullfd = open("/dev/null", O_RDWR | O_APPEND);
|
||||
if (nullfd < 0) {
|
||||
log_err(LD_GENERAL,"/dev/null can't be opened. Exiting.");
|
||||
exit(1);
|
||||
|
||||
Reference in New Issue
Block a user