#include <signal.h>#include <stdio.h>#include <setjmp.h> 使用sigaction来实现signal函数,然后用一个例子测试一下.该例子打印3的倍数,两秒运行后接收到SIGALRM信号. 超时退出. 相关文章: