mirror of
https://sourceware.org/git/glibc.git
synced 2024-12-22 10:50:07 +00:00
(main): Improve error message for unexpected signal case.
This commit is contained in:
parent
6e606fad8d
commit
3fc65a7735
@ -263,8 +263,17 @@ main (int argc, char *argv[])
|
||||
if (WTERMSIG (status) != EXPECTED_SIGNAL)
|
||||
{
|
||||
if (EXPECTED_SIGNAL != 0)
|
||||
fprintf (stderr, "Incorrect signal from child: got `%s', need `%s'\n",
|
||||
strsignal (WTERMSIG (status)), strsignal (EXPECTED_SIGNAL));
|
||||
{
|
||||
if (WTERMSIG (status) == 0)
|
||||
fprintf (stderr,
|
||||
"Expected signal '%s' from child, got none\n",
|
||||
strsignal (EXPECTED_SIGNAL));
|
||||
else
|
||||
fprintf (stderr,
|
||||
"Incorrect signal from child: got `%s', need `%s'\n",
|
||||
strsignal (WTERMSIG (status)),
|
||||
strsignal (EXPECTED_SIGNAL));
|
||||
}
|
||||
else
|
||||
fprintf (stderr, "Didn't expect signal from child: got `%s'\n",
|
||||
strsignal (WTERMSIG (status)));
|
||||
|
Loading…
Reference in New Issue
Block a user