waitpid man page has issues
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
manpages (Ubuntu) |
Invalid
|
Undecided
|
Unassigned |
Bug Description
Binary package hint: manpages-dev
Hi,
(using Ubuntu Feisty, 7.05)
the waitpid man page states:
'Otherwise they block until either a child changes state or a
signal handler interrupts the call (assuming that system calls are not
automatically restarted using the SA_RESTART flag of sigaction(2)).'
well, this implies that system calls under Linux are _not_ restarted by default. But apparently waitpid is restarted by default (i.e. without calling sigaction to set the SA_RESTART). I tested it with SIGALRM and Ubuntu kernel 2.6.20.
The man page should reflect the default.
Another problem:
'waitpid(): on success, returns the process ID of the child whose state
has changed; on error, -1 is returned; if WNOHANG was specified and no
child(ren) specified by pid has yet changed state, then 0 is returned.'
waitpid returns -1 if a signal handler interrupted the call (i.e. if the SA_RESTART flag was cleaned with a sigaction call). This is no error, or is it?
Also compare against waitpid(3posix).
Best regards
Georg Sauthoff
Is this symptom still reproducible in 8.10?