- if (action == Break) {
- raise(SIGINT);
- } else {
- sigemptyset(&ss);
- sigaddset(&ss, SIGINT);
- sigwaitinfo(&ss, NULL);
- }
+ raise(SIGINT);
+ sigaction(SIGINT, &psa, NULL);
+ NOTICE("DEBUG BREAK after %s", key);
+ } else if (has_key(key, secure_getenv(key_env_wait))) {
+ NOTICE("DEBUG WAIT before %s", key);
+ sigfillset(&ss);
+ sigdelset(&ss, SIGINT);
+ sigprocmask(SIG_SETMASK, &ss, &oss);
+ sigemptyset(&ss);
+ sigaddset(&ss, SIGINT);
+ memset(&sa, 0, sizeof sa);
+ sa.sa_handler = handler;
+ sigaction(SIGINT, &sa, &psa);
+ indicate(key);
+ sigwaitinfo(&ss, NULL);