summaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2010-05-18 05:10:52 +0200
committerLennart Poettering <lennart@poettering.net>2010-05-18 05:10:52 +0200
commitc8513d54d23a36fc84b2f0b96989da3041ad15bc (patch)
treec1126dbf706ff0a39a6fb6b2d6bf8046d939e8fc /src/main.c
parent710bd1434709402e557b03a684eb905b619477dc (diff)
log: never close file descriptors < 3
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main.c b/src/main.c
index 311ece6b57..2e754fe6e0 100644
--- a/src/main.c
+++ b/src/main.c
@@ -175,7 +175,7 @@ static void install_crash_handler(void) {
static int make_null_stdio(void) {
int null_fd, r;
- if ((null_fd = open("/dev/null", O_RDWR)) < 0) {
+ if ((null_fd = open("/dev/null", O_RDWR|O_NOCTTY)) < 0) {
log_error("Failed to open /dev/null: %m");
return -errno;
}