/* 
 * external.c - A program that responds to externally 
 *              generated events (ctrl-c) 
 */
#include "csapp.h"
#include "safe_printf.h"

void handler(int sig) { 
    safe_printf("You think hitting ctrl-c will stop the bomb?\n"); 
    sleep(2); 
    safe_printf("Well..."); 
    sleep(1); 
    safe_printf("OK\n"); 
    _exit(0); 
} 
 
int main() { 
    signal(SIGINT, handler); /* installs ctl-c handler */
    while(1) { 
	continue;
    } 
} 
