]> sourceware.org Git - glibc.git/commitdiff
(main): Improve error message for unexpected signal case.
authorUlrich Drepper <drepper@redhat.com>
Fri, 6 Sep 2002 09:15:54 +0000 (09:15 +0000)
committerUlrich Drepper <drepper@redhat.com>
Fri, 6 Sep 2002 09:15:54 +0000 (09:15 +0000)
test-skeleton.c

index 3216b9451133f360628ab37ea7ee2d5615943a8e..47b0143d7f67e5aab391c417ce02c53370760521 100644 (file)
@@ -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)));
This page took 0.037552 seconds and 5 git commands to generate.