#include <signal.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>

void sig_alarm(int signo)
{
   //nothing to do
}

main(int argc, char * argv[])
{
   int seconds;
   seconds=atoi(argv[1]);
   if(signal(SIGALRM,sig_alarm)==SIG_ERR)
	exit(1);
   alarm(seconds);
   pause();
   exit(alarm(0));
}
