- 论坛徽章:
- 0
|
摘自 APUE 10.5 Interrupted System Calls
A characteristic of earlier UNIX systems is that if a process caught a signal while the process was blocked in a "slow" system call, the system call was interrupted. The system call returned an error and errno was set to EINTR. This was done under the assumption that since a signal occurred and the process caught it, there is a good chance that something has happened that should wake up the blocked system call.
Here, we have to differentiate between a system call and a function. It is a system call within the kernel that is interrupted when a signal is caught.
不知道你对sigusr1的处理情况, 默认是终止进程. 此外, 某些系统会自动继续系统调用有些则不会, 该设置可以被改变 |
|