From d3feea0181720d6e872875c52200511a5e5878a0 Mon Sep 17 00:00:00 2001 From: Giuseppe Scrivano Date: Wed, 29 Jul 2009 20:57:29 +0200 Subject: 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. --- src/tail.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') 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; } -- cgit v1.2.3-54-g00ecf