tags 477305 fixed-upstream
thanks
On Tue, Apr 22, 2008 at 05:21:10AM -0500, Drake Wilson wrote:
> From the man page for man:
>
> -f, --whatis
> Equivalent to whatis. Display a short description from
> the manual page, if available. See whatis(1) for
> details.
>
> From the man page for whatis:
>
> EXIT STATUS
> 0 Successful program execution.
>
> 1 Usage, syntax or configuration file error.
>
> 2 Operational error.
>
> 16 No manual pages were found that matched the criteria
> specified.
>
> However, man -f does not use the exit status of whatis; instead, it
> always returns a zero exit status:
[...]
> The output of [man -f --debug foobar] is attached per the
> bug-reporting note (but I expect this is a simple case of not
> propagating the return code).
Actually, it's due to propagating the exit status in the wrong format.
strace demonstrates:
waitpid(-1, foobar: nothing appropriate.
[{WIFEXITED(s) && WEXITSTATUS(s) == 16}], 0) = 24037
--- SIGCHLD (Child exited) @ 0 (0) ---
sigreturn() = ? (mask now [])
waitpid(-1, 0xbfbd28b8, WNOHANG) = -1 ECHILD (No child processes)
rt_sigaction(SIGINT, {0x805a0f0, [], 0}, NULL, 8) = 0
rt_sigaction(SIGQUIT, {SIG_DFL}, NULL, 8) = 0
exit_group(4096) = ?
man needs to turn the wait status returned by waitpid into something
suitable for passing to exit. I've done this upstream:
Mon Nov 17 00:39:14 GMT 2008 Colin Watson <[EMAIL PROTECTED]>
* lib/pipeline.c (pipeline_wait): Mangle return value into a value
suitable for passing to exit (Debian bug #477305).
Thanks,
--
Colin Watson [EMAIL PROTECTED]
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]