diff options
author | Ulrich Drepper <drepper@redhat.com> | 2002-09-06 09:15:54 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2002-09-06 09:15:54 +0000 |
commit | 3fc65a7735a6be434d7116b0f61e1eb51f349371 (patch) | |
tree | aaaf5afc0d01c7b6d57b54b2c0486784ee3e8edd /test-skeleton.c | |
parent | 6e606fad8da37fb175205244c794c5aae58ffda1 (diff) | |
download | glibc-3fc65a7735a6be434d7116b0f61e1eb51f349371.zip glibc-3fc65a7735a6be434d7116b0f61e1eb51f349371.tar.gz glibc-3fc65a7735a6be434d7116b0f61e1eb51f349371.tar.bz2 |
(main): Improve error message for unexpected signal case.
Diffstat (limited to 'test-skeleton.c')
-rw-r--r-- | test-skeleton.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/test-skeleton.c b/test-skeleton.c index 3216b94..47b0143 100644 --- a/test-skeleton.c +++ b/test-skeleton.c @@ -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))); |