+ sigwaiter_mutex = xbt_os_mutex_init();
+ sigwaiter_cond = xbt_os_cond_init();
+ xbt_os_mutex_acquire(sigwaiter_mutex);
+ sigwaiter_thread = xbt_os_thread_create("Armaggedon request waiter",
+ armageddon_sigwaiter, NULL);
+ /* Wait for thread to start... */
+ xbt_os_cond_wait(sigwaiter_cond, sigwaiter_mutex);
+ xbt_os_mutex_release(sigwaiter_mutex);
+ memset(&newact, 0, sizeof(newact));
+ newact.sa_handler = armageddon_sighandler;
+ oldact[0].num = SIGINT;
+ oldact[1].num = SIGQUIT;
+ oldact[2].num = SIGTERM;
+ for (i = 0; i < 3; i++)
+ sigaction(oldact[i].num, &newact, &oldact[i].act);