#include <err.h>
#include <signal.h>
#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>

void handler(int signo) {
	_exit(signo);
}

int main(void) {
	struct sigaction sa;
	sa.sa_handler = handler;
	sigemptyset(&sa.sa_mask);
	sa.sa_flags = 0;
	if (sigaction(SIGINT, &sa, NULL) < 0)
		err(EXIT_FAILURE, "sigaction");
	if (sigaction(SIGTSTP, &sa, NULL) < 0)
		err(EXIT_FAILURE, "sigaction");
	if (sigaction(SIGQUIT, &sa, NULL) < 0)
		err(EXIT_FAILURE, "sigaction");
	if (sigaction(SIGHUP, &sa, NULL) < 0)
		err(EXIT_FAILURE, "sigaction");
	printf("okay\n");
	while (true)
		pause();
}
