From: Giuseppe Scrivano Date: Wed, 29 Jul 2009 18:57:29 +0000 (+0200) Subject: tail: exit successfully upon watched process death X-Git-Tag: v7.5~37 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d3feea0181720d6e872875c52200511a5e5878a0;p=thirdparty%2Fcoreutils.git tail: exit successfully upon watched process death * src/tail.c (tail_forever_inotify): If a PID is specified and the watched process dies, exit with status EXIT_SUCCESS, rather than falling through to an EXIT_FAILURE. --- diff --git a/src/tail.c b/src/tail.c index a73ffa25df..5efaf57d98 100644 --- a/src/tail.c +++ b/src/tail.c @@ -1280,7 +1280,7 @@ tail_forever_inotify (int wd, struct File_spec *f, size_t n_files, { /* See if the process we are monitoring is still alive. */ if (kill (pid, 0) != 0 && errno != EPERM) - break; + exit (EXIT_SUCCESS); continue; }