[uClibc-cvs] svn commit: trunk/uClibc/test/signal

vapier at uclibc.org vapier at uclibc.org
Sat Jul 9 00:29:15 UTC 2005


Author: vapier
Date: 2005-07-08 18:29:15 -0600 (Fri, 08 Jul 2005)
New Revision: 10762

Log:
make sure the call to signal() worked

Modified:
   trunk/uClibc/test/signal/signal.c


Changeset:
Modified: trunk/uClibc/test/signal/signal.c
===================================================================
--- trunk/uClibc/test/signal/signal.c	2005-07-09 00:28:32 UTC (rev 10761)
+++ trunk/uClibc/test/signal/signal.c	2005-07-09 00:29:15 UTC (rev 10762)
@@ -70,14 +70,20 @@
 	global_int = 0;
 
 	it = "global variable set from signal handler";
-	signal(SIGUSR1, set_global_int_to_one);
+	if (signal(SIGUSR1, set_global_int_to_one) == SIG_ERR) {
+		perror("signal(SIGUSR1) failed");
+		exit(-1);
+	}
 	raise(SIGUSR1);
 
 	/* This should already have jumped to the signal handler */
 	check((global_int == 1), 1);
 
 	global_int = 0;
-	signal(SIGUSR1, SIG_IGN);
+	if (signal(SIGUSR1, SIG_IGN) == SIG_ERR) {
+		perror("signal(SIGUSR1) failed");
+		exit(-1);
+	}
 	raise(SIGUSR1);
 	/* This should not go to the signal handler this time since we  */
 	check((global_int == 0), 1);




More information about the uClibc-cvs mailing list