PERFORCE change 134069 for review

John Birrell jb at FreeBSD.org
Fri Jan 25 00:54:18 PST 2008


http://perforce.freebsd.org/chv.cgi?CH=134069

Change 134069 by jb at jb_freebsd1 on 2008/01/25 08:53:19

	Port this to FreeBSD.

Affected files ...

.. //depot/projects/dtrace/src/contrib/opensolaris/cmd/dtrace/test/tst/common/proc/tst.sigwait.c#4 edit

Differences ...

==== //depot/projects/dtrace/src/contrib/opensolaris/cmd/dtrace/test/tst/common/proc/tst.sigwait.c#4 (text+ko) ====

@@ -33,6 +33,8 @@
 #include <errno.h>
 #include <string.h>
 
+#define NANOSEC	1000000000
+
 int
 main(int argc, char **argv)
 {
@@ -41,6 +43,7 @@
 	sigset_t set;
 	timer_t tid;
 	char *cmd = argv[0];
+	int sig;
 
 	ev.sigev_notify = SIGEV_SIGNAL;
 	ev.sigev_signo = SIGUSR1;
@@ -66,9 +69,9 @@
 		exit(EXIT_FAILURE);
 	}
 
-	for (;;) {
-		(void) sigwait(&set);
-	}
+	do {
+		(void) sigwait(&set, &sig);
+	} while(sig != SIGUSR1);
 
 	/*NOTREACHED*/
 	return (0);


More information about the p4-projects mailing list