Explain the error branch.

This commit is contained in:
Andrew Wood
2026-04-09 21:58:38 +01:00
parent 989a34b7c7
commit 593723ba92
+2
View File
@@ -204,10 +204,12 @@ static bool opts_watchfd_processname(opts_t opts, const char *process_name)
/* Subprocess in which to run pgrep. */
pid = (pid_t) fork();
if (pid < 0) {
/* Fork failure - error return. */
fprintf(stderr, "%s: %s\n", opts->program_name, strerror(errno));
(void) close(fds[0]);
(void) close(fds[1]);
return false;
} else if (0 == pid) {
int nullfd;