diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/util.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/util.c b/src/util.c index 7383f23d6..46e99c309 100644 --- a/src/util.c +++ b/src/util.c @@ -2305,10 +2305,13 @@ rspamd_read_passphrase (gchar *buf, gint size, gint rwflag, gpointer key) gchar *end, *p, ch; restart: - if ((input = output = open (_PATH_TTY, O_RDWR | O_CLOEXEC)) == -1) { + if ((input = output = open (_PATH_TTY, O_RDWR)) == -1) { errno = ENOTTY; return 0; } + if (fcntl (input, F_SETFD, FD_CLOEXEC) == -1) { + msg_warn ("fcntl failed: %d, '%s'", errno, strerror (errno)); + } /* Turn echo off */ if (tcgetattr (input, &oterm) != 0) { |