Changeset 72de5f in git
- Timestamp:
- Feb 4, 2013, 4:45:59 PM (10 years ago)
- Branches:
- (u'jengelh-datetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', 'a800fe4b3e9d37a38c5a10cc0ae9dfa0c15a4ee6')
- Children:
- 9bc6a43bf738fd99b4fb51230cb0c76f2ffee68d
- Parents:
- b7e0a075c343b4225cf6b4a64667feb0927313e2
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Singular/cntrlc.cc
rb7e0a0 r72de5f 132 132 si_hdl_typ si_set_signal ( int sig, si_hdl_typ signal_handler) 133 133 { 134 #if 0 134 135 si_hdl_typ retval=signal (sig, (si_hdl_typ)signal_handler); 135 136 if (retval == SIG_ERR) … … 138 139 } 139 140 #ifdef HAVE_SIGINTERRUPT 140 siginterrupt(sig, 1); 141 siginterrupt(sig, 0); 142 /*system calls will be restarted if interrupted by the specified 143 * signal sig. This is the default behavior in Linux. 144 */ 145 #endif 146 #else 147 struct sigaction new_action,old_action; 148 149 /* Set up the structure to specify the new action. */ 150 new_action.sa_handler = signal_handler; 151 if (sig==SIGINT) 152 sigemptyset (&new_action.sa_mask); 153 else 154 new_action.sa_flags = SA_RESTART; 155 156 int r=sigaction (sig, &new_action, &old_action); 157 si_hdl_typ retval=(si_hdl_typ)old_action.sa_handler; 158 if (r == -1) 159 { 160 fprintf(stderr, "Unable to init signal %d ... exiting...\n", sig); 161 retval=SIG_ERR; 162 } 141 163 #endif 142 164 return retval;
Note: See TracChangeset
for help on using the changeset viewer.