+2014-06-27 Arjun Shankar <arjun.is@lostca.se>
+
+ [BZ #17092]
+ * nscd/nscd.c (monitor_child): Return exit status of child
+ instead of return value from wait syscall.
+
2014-06-27 Joseph Myers <joseph@codesourcery.com>
* configure.ac (libc_commonpagesize): Remove variable.
16882, 16885, 16888, 16890, 16912, 16915, 16916, 16917, 16918, 16922,
16927, 16928, 16932, 16943, 16958, 16965, 16966, 16967, 16977, 16978,
16984, 16990, 16996, 17009, 17022, 17031, 17042, 17048, 17050, 17058,
- 17061, 17062, 17069, 17075, 17079, 17084, 17086.
+ 17061, 17062, 17069, 17075, 17079, 17084, 17086, 17092.
* Optimized strchr implementation for AArch64. Contributed by ARM Ltd.
method, like a segfault. */
if (ret <= 0 || child_ret != 0)
{
- int err = wait (&child_ret);
+ int status;
+ int err = wait (&status);
if (err < 0)
{
- fprintf (stderr, _("wait failed"));
+ fprintf (stderr, _("'wait' failed\n"));
return 1;
}
- fprintf (stderr, _("child exited with status %d"),
- WEXITSTATUS (child_ret));
- if (WIFSIGNALED (child_ret))
- fprintf (stderr, _(", terminated by signal %d.\n"),
- WTERMSIG (child_ret));
- else
- fprintf (stderr, ".\n");
+ if (WIFEXITED (status))
+ {
+ child_ret = WEXITSTATUS (status);
+ fprintf (stderr, _("child exited with status %d\n"), child_ret);
+ }
+ if (WIFSIGNALED (status))
+ {
+ child_ret = WTERMSIG (status);
+ fprintf (stderr, _("child terminated by signal %d\n"), child_ret);
+ }
}
/* We have the child status, so exit with that code. */