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.
This commit is contained in:
Giuseppe Scrivano authored and Jim Meyering committed 2009-07-30 10:24:17 +02:00
1 parent 5ef9069576
commit d3feea0181
1 file changed
+1 -1
+1 -1
View File
@@ -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;
}