diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-14 19:33:32 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-14 19:33:32 +0000 |
commit | 8bb05ac73a5b448b339ce0bc8d396c82c459b47f (patch) | |
tree | 1fdda006866bca20d41cb206767ea5241e36852f /misc-utils/waitpid.c | |
parent | Adding debian version 2.39.3-11. (diff) | |
download | util-linux-8bb05ac73a5b448b339ce0bc8d396c82c459b47f.tar.xz util-linux-8bb05ac73a5b448b339ce0bc8d396c82c459b47f.zip |
Merging upstream version 2.40.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'misc-utils/waitpid.c')
-rw-r--r-- | misc-utils/waitpid.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/misc-utils/waitpid.c b/misc-utils/waitpid.c index b01a2f0..0a4e03d 100644 --- a/misc-utils/waitpid.c +++ b/misc-utils/waitpid.c @@ -41,9 +41,6 @@ #define TIMEOUT_SOCKET_IDX UINT64_MAX -#define err_nosys(exitcode, ...) \ - err(errno == ENOSYS ? EXIT_NOTSUPP : exitcode, __VA_ARGS__) - static bool verbose = false; static struct timespec timeout; static bool allow_exited = false; @@ -67,7 +64,8 @@ static int *open_pidfds(size_t n_pids, pid_t *pids) pidfds[i] = pidfd_open(pids[i], 0); if (pidfds[i] == -1) { if (allow_exited && errno == ESRCH) { - warnx(_("PID %d has exited, skipping"), pids[i]); + if (verbose) + warnx(_("PID %d has exited, skipping"), pids[i]); continue; } err_nosys(EXIT_FAILURE, _("could not open pid %u"), pids[i]); |