Report the system error message along with the syscall.

This commit is contained in:
Andrew Wood
2026-06-08 21:50:32 +01:00
parent 34ee909c59
commit 1190e70085
+1 -1
View File
@@ -223,7 +223,7 @@ static bool opts_watchfd_processname(opts_t opts, const char *process_name)
exit(EXIT_FAILURE);
}
if (dup2(nullfd, STDIN_FILENO) < 0) {
pv_error("%s", "dup2");
pv_perror("%s", "dup2");
exit(EXIT_FAILURE);
}
(void) close(nullfd);