Проблема с обработкой сигнала, обработкой прерывания

While the process is executing a blocking system call, say read or write, signal has arrived. Does the system call is terminated with the error EINTR? Does the system call is restarted after handling the system call?

Suppose, system call is terminated with the error EINTR, Kernel handles the signal before returing to user space.

Does the signal handle is executed in user mode/kernel mode? If its in user mode, does there'll be return to the instruction after the system call(read/write) during which signal arrived or again it goes to kernel mode after handling the signal and returns to the user from ret_from_syscall. How the execution is resumed at the instruction next to the system call during which signal arrived?

Is it possible to restart the system by passing SA_RESTART flag in sigaction?

7
задан Amit Tomar 18 April 2013 в 09:23
поделиться