就是想在inotify-tools源码(https://github.com/rvoicilas/inotify-tools/blob/1df9af4d6cd0f4af4b1b19254bcf056aed4ae395/libinotifytools/src/inotifytools.c#L1736)上加一个定时器。
void func()
{
printf("this is func\n");
}
int inotifytools_printf( struct inotify_event* event, char* fmt ) {
signal(SIGALRM, func);
alarm(3);
return inotifytools_fprintf( stdout, event, fmt );
}
请问这个直接Interrupted system call是什么原因呢。
我直接用一个main函数测试不会出现Interrupted system call这种情况。
是因为另人做了什么处理了吗?