From 47c7ed9f3aed759ed73a32657e9dba8e3a519b26 Mon Sep 17 00:00:00 2001 From: Drew DeVault Date: Wed, 2 Sep 2015 10:47:02 -0400 Subject: [PATCH] Do not set FD_CLOEXEC --- sway/log.c | 9 --------- 1 file changed, 9 deletions(-) diff --git a/sway/log.c b/sway/log.c index efe00439..fed1239c 100644 --- a/sway/log.c +++ b/sway/log.c @@ -22,15 +22,6 @@ static const char *verbosity_colors[] = { void init_log(log_importance_t verbosity) { v = verbosity; - /* set FD_CLOEXEC flag to prevent programs called with exec to write into logs */ - int i; - int fd[] = { STDOUT_FILENO, STDIN_FILENO, STDERR_FILENO }; - for (i = 0; i < 3; ++i) { - int flag = fcntl(fd[i], F_GETFD); - if (flag != -1) { - fcntl(fd[i], F_SETFD, flag | FD_CLOEXEC); - } - } signal(SIGSEGV, error_handler); signal(SIGABRT, error_handler); }