Clarify logic.

This commit is contained in:
Dianne Skoll
2023-12-25 10:16:59 -05:00
parent 32e8db322d
commit 861ce34022
2 changed files with 3 additions and 2 deletions

View File

@@ -23,6 +23,7 @@
#define isempty(c) (isspace(c) || ((c) == '\\'))
#define IsServerMode() (Daemon < 0)
#define ShouldFork (!DontFork)
#include "dynbuf.h"
#include <ctype.h>

View File

@@ -189,7 +189,7 @@ void HandleQueuedReminders(void)
* processed correctly are RUN commands, provided they mail
* the result back or use their own resource (as a window).
*/
if (!DontFork) {
if (ShouldFork) {
maybe_close(STDIN_FILENO);
maybe_close(STDOUT_FILENO);
maybe_close(STDERR_FILENO);
@@ -212,7 +212,7 @@ void HandleQueuedReminders(void)
q = q->next;
}
if (!DontFork || Daemon) {
if (ShouldFork || Daemon) {
sa.sa_handler = SigIntHandler;
sa.sa_flags = 0;
(void) sigaction(SIGINT, &sa, NULL);