- /* install our new interrupt signal handler */
- if ( (osig = signal(SIGINT, sigint_handler_)) == SIG_ERR ) {
- fprintf(stderr, "%s():%s\n", "signal", strerror(errno));
+ memset(&act, 0, sizeof act);
+ act.sa_handler = sigint_handler_;
+ act.sa_flags = SA_RESETHAND;
+
+ if (sigaction(SIGINT, &act, NULL)) {
+ fprintf(stderr, "%s():%s\n", "sigaction", strerror(errno));