Report the system error message along with the syscall.
This commit is contained in:
+1
-1
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user