summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGiuseppe Scrivano <gscrivano@gnu.org>2009-07-29 20:57:29 +0200
committerJim Meyering <meyering@redhat.com>2009-07-30 10:24:17 +0200
commitd3feea0181720d6e872875c52200511a5e5878a0 (patch)
treef841616773907d51551e93186b3084cf8302243a
parent5ef9069576230e11b123fffb52012c5b0e9c5f33 (diff)
downloadcoreutils-d3feea0181720d6e872875c52200511a5e5878a0.tar.xz
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.
-rw-r--r--src/tail.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/tail.c b/src/tail.c
index a73ffa25d..5efaf57d9 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;
}