Update docs; close stdin when we go to queuing mode.

This commit is contained in:
Dianne Skoll
2025-10-07 14:00:11 -04:00
parent 5876663f1b
commit 96c15ef42a
2 changed files with 23 additions and 1 deletions

View File

@@ -190,7 +190,7 @@ maybe_close(int fd)
{
int new_fd;
/* Don't close descriptors connected to a TTY, except for stdin */
if (fd && isatty(fd)) return;
if (fd != STDIN_FILENO && isatty(fd)) return;
(void) close(fd);
if (fd != STDIN_FILENO) {
@@ -280,6 +280,8 @@ void HandleQueuedReminders(void)
maybe_close(STDIN_FILENO);
maybe_close(STDOUT_FILENO);
maybe_close(STDERR_FILENO);
} else if (!Daemon) {
maybe_close(STDIN_FILENO);
}
/* If we're a daemon, get the mod time of initial file */