在循环语句里break是直接跳出循环
exit(),里面再加入参数表示就可以了
#include#include#include#includevoidBreak(intsigno){printf("TIMEOUT\n");exit(1);}intmain(void){signal(SIGALRM,Break);alarm(5);while(1);return0;}
exit(0) and exit(1)
return