#1039049 coreutils: tail: --pid=0 allowed(?) and appears to disable the pid functionality

Package:
coreutils
Source:
coreutils
Description:
GNU core utilities
Submitter:
наб
Date:
2023-06-25 02:33:04 UTC
Severity:
normal
#1039049#5
Date:
2023-06-25 02:30:54 UTC
From:
To:
Dear Maintainer,

Quoth tail(1):
       --pid=PID
              with -f, terminate after process ID, PID dies

Discounting the weird phrasing, the functionality is clear,
as is the domain: processes have IDs in [1, system_limit)
([1, kernel.pid_max) under linux).

If tail --pid=-1 were accepted, then one would expect tail --pid=0 to
behave the same way.

But tail --pid=-1 is forbidden
(since by definition no process may have a negative PID),
but tail --pid=0 is allowed and just does nothing, even though it's
precisely the same case as -1?

Best,
наб