Mercurial > emacs
comparison src/sysdep.c @ 20948:a9a9a13079b4
(sys_sigpause): Removed.
(new_action, old_action): Move as local variables into sys_signal.
(old_mask, temp_mask): Removed.
author | Andreas Schwab <schwab@suse.de> |
---|---|
date | Fri, 20 Feb 1998 13:00:21 +0000 |
parents | 22dd2d861e36 |
children | fa9ff387d260 |
comparison
equal
deleted
inserted
replaced
20947:a66eb4a41765 | 20948:a9a9a13079b4 |
---|---|
2725 /* POSIX signals support - DJB */ | 2725 /* POSIX signals support - DJB */ |
2726 /* Anyone with POSIX signals should have ANSI C declarations */ | 2726 /* Anyone with POSIX signals should have ANSI C declarations */ |
2727 | 2727 |
2728 #ifdef POSIX_SIGNALS | 2728 #ifdef POSIX_SIGNALS |
2729 | 2729 |
2730 sigset_t old_mask, empty_mask, full_mask, temp_mask; | 2730 sigset_t empty_mask, full_mask; |
2731 static struct sigaction new_action, old_action; | |
2732 | 2731 |
2733 init_signals () | 2732 init_signals () |
2734 { | 2733 { |
2735 sigemptyset (&empty_mask); | 2734 sigemptyset (&empty_mask); |
2736 sigfillset (&full_mask); | 2735 sigfillset (&full_mask); |
2737 } | 2736 } |
2738 | 2737 |
2739 signal_handler_t | 2738 signal_handler_t |
2740 sys_signal (int signal_number, signal_handler_t action) | 2739 sys_signal (int signal_number, signal_handler_t action) |
2741 { | 2740 { |
2741 struct sigaction new_action, old_action; | |
2742 sigemptyset (&new_action.sa_mask); | 2742 sigemptyset (&new_action.sa_mask); |
2743 new_action.sa_handler = action; | 2743 new_action.sa_handler = action; |
2744 #ifdef SA_RESTART | 2744 #ifdef SA_RESTART |
2745 /* Emacs mostly works better with restartable system services. If this | 2745 /* Emacs mostly works better with restartable system services. If this |
2746 * flag exists, we probably want to turn it on here. | 2746 * flag exists, we probably want to turn it on here. |
2763 sigemptyset (&mask); | 2763 sigemptyset (&mask); |
2764 sigaddset (&mask, sig); | 2764 sigaddset (&mask, sig); |
2765 return mask; | 2765 return mask; |
2766 } | 2766 } |
2767 #endif | 2767 #endif |
2768 | |
2769 int | |
2770 sys_sigpause (sigset_t new_mask) | |
2771 { | |
2772 /* pause emulating berk sigpause... */ | |
2773 sigsuspend (&new_mask); | |
2774 return (EINTR); | |
2775 } | |
2776 | 2768 |
2777 /* I'd like to have these guys return pointers to the mask storage in here, | 2769 /* I'd like to have these guys return pointers to the mask storage in here, |
2778 but there'd be trouble if the code was saving multiple masks. I'll be | 2770 but there'd be trouble if the code was saving multiple masks. I'll be |
2779 safe and pass the structure. It normally won't be more than 2 bytes | 2771 safe and pass the structure. It normally won't be more than 2 bytes |
2780 anyhow. - DJB */ | 2772 anyhow. - DJB */ |