diff options
author | Drew DeVault <sir@cmpwn.com> | 2015-09-02 10:47:02 -0400 |
---|---|---|
committer | Drew DeVault <sir@cmpwn.com> | 2015-09-02 10:47:02 -0400 |
commit | 47c7ed9f3aed759ed73a32657e9dba8e3a519b26 (patch) | |
tree | 8c673d8f6b06136eb01ec8df47566f59f950724c | |
parent | Log sway version on startup (diff) | |
download | sway-47c7ed9f3aed759ed73a32657e9dba8e3a519b26.tar.gz sway-47c7ed9f3aed759ed73a32657e9dba8e3a519b26.tar.zst sway-47c7ed9f3aed759ed73a32657e9dba8e3a519b26.zip |
Do not set FD_CLOEXEC
-rw-r--r-- | sway/log.c | 9 |
1 files changed, 0 insertions, 9 deletions
@@ -22,15 +22,6 @@ static const char *verbosity_colors[] = { | |||
22 | 22 | ||
23 | void init_log(log_importance_t verbosity) { | 23 | void init_log(log_importance_t verbosity) { |
24 | v = verbosity; | 24 | v = verbosity; |
25 | /* set FD_CLOEXEC flag to prevent programs called with exec to write into logs */ | ||
26 | int i; | ||
27 | int fd[] = { STDOUT_FILENO, STDIN_FILENO, STDERR_FILENO }; | ||
28 | for (i = 0; i < 3; ++i) { | ||
29 | int flag = fcntl(fd[i], F_GETFD); | ||
30 | if (flag != -1) { | ||
31 | fcntl(fd[i], F_SETFD, flag | FD_CLOEXEC); | ||
32 | } | ||
33 | } | ||
34 | signal(SIGSEGV, error_handler); | 25 | signal(SIGSEGV, error_handler); |
35 | signal(SIGABRT, error_handler); | 26 | signal(SIGABRT, error_handler); |
36 | } | 27 | } |