sigsuspend_d.c (59612) | sigsuspend_d.c (117706) |
---|---|
1/* 2 * Copyright (c) 1998 Daniel M. Eischen <eischen@vigrid.com> 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 15 unchanged lines hidden (view full) --- 24 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 25 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 26 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 27 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 28 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 29 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 30 * SUCH DAMAGE. 31 * | 1/* 2 * Copyright (c) 1998 Daniel M. Eischen <eischen@vigrid.com> 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 15 unchanged lines hidden (view full) --- 24 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 25 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 26 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 27 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 28 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 29 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 30 * SUCH DAMAGE. 31 * |
32 * $FreeBSD: head/lib/libkse/test/sigsuspend_d.c 59612 2000-04-24 21:07:45Z jasone $ | 32 * $FreeBSD: head/lib/libkse/test/sigsuspend_d.c 117706 2003-07-17 23:02:30Z davidxu $ |
33 */ 34#include <stdlib.h> 35#include <unistd.h> 36 37#include <errno.h> 38#include <pthread.h> 39#include <signal.h> 40#include <stdio.h> --- 17 unchanged lines hidden (view full) --- 58 sigset_t run_mask; 59 60 /* Run with all signals blocked. */ 61 sigfillset (&run_mask); 62 sigprocmask (SIG_SETMASK, &run_mask, NULL); 63 64 /* Allow these signals to wake us up during a sigsuspend. */ 65 sigfillset (&suspender_mask); /* Default action */ | 33 */ 34#include <stdlib.h> 35#include <unistd.h> 36 37#include <errno.h> 38#include <pthread.h> 39#include <signal.h> 40#include <stdio.h> --- 17 unchanged lines hidden (view full) --- 58 sigset_t run_mask; 59 60 /* Run with all signals blocked. */ 61 sigfillset (&run_mask); 62 sigprocmask (SIG_SETMASK, &run_mask, NULL); 63 64 /* Allow these signals to wake us up during a sigsuspend. */ 65 sigfillset (&suspender_mask); /* Default action */ |
66 sigdelset (&suspender_mask, SIGKILL); /* Cannot catch */ 67 sigdelset (&suspender_mask, SIGSTOP); /* Cannot catch */ |
|
66 sigdelset (&suspender_mask, SIGINT); /* terminate */ 67 sigdelset (&suspender_mask, SIGHUP); /* terminate */ 68 sigdelset (&suspender_mask, SIGQUIT); /* create core image */ 69 sigdelset (&suspender_mask, SIGURG); /* ignore */ 70 sigdelset (&suspender_mask, SIGIO); /* ignore */ 71 sigdelset (&suspender_mask, SIGUSR2); /* terminate */ 72 73 while (sigcounts[SIGINT] == 0) { --- 215 unchanged lines hidden --- | 68 sigdelset (&suspender_mask, SIGINT); /* terminate */ 69 sigdelset (&suspender_mask, SIGHUP); /* terminate */ 70 sigdelset (&suspender_mask, SIGQUIT); /* create core image */ 71 sigdelset (&suspender_mask, SIGURG); /* ignore */ 72 sigdelset (&suspender_mask, SIGIO); /* ignore */ 73 sigdelset (&suspender_mask, SIGUSR2); /* terminate */ 74 75 while (sigcounts[SIGINT] == 0) { --- 215 unchanged lines hidden --- |