[PATCH] Correctly report nscd child process status.

Arjun Shankar arjun.is@lostca.se
Tue Jun 24 23:19:00 GMT 2014


Hi,

The nscd parent process returns the result of a `wait' call rather than
the exit status of the child it waits for. These two aren't exactly the
same. In my case (and probably on most machines), the exit status is in
the 2nd LSB of the result of `wait', and so:

e.g. if the nscd child process returns 1, the parent returns 1 << 8,
which Bash happily reports as 0.

This patch should fix that.

Cheers,
Arjun

---
 nscd/nscd.c | 20 ++++++++++++--------
 1 file changed, 12 insertions(+), 8 deletions(-)

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Correctly-report-nscd-child-process-status.patch
Type: text/x-patch
Size: 1073 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/libc-alpha/attachments/20140624/3ddd086a/attachment.bin>


More information about the Libc-alpha mailing list