mirror of
https://git.savannah.gnu.org/git/coreutils.git
synced 2026-11-19 03:33:43 +03:00
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:
1 parent
5ef9069576
commit
d3feea0181
1 file changed
+1
-1
+1
-1
@@ -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;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user