[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [MiNT] sigaction() and SA_RESTART / SA_INTERRUPT
On Wed, 2009-02-25 at 22:00 +0000, David Brownlee wrote:
> Is there any way to SA_RESTART or SA_INTERRUPT in sa_flags
> for sigaction() under mint? Ther are the two ways to
> determine whether system calls should be restarted after
> a signal?
Nope, currently unsupported.
Alan.
> For reference the definition of SA_RESTART is:
>
> SA_RESTART Normally, if a signal is caught during the system calls
> listed below, the call may be forced to terminate with the
> error EINTR, the call may return with a data transfer
> shorter than requested, or the call may be restarted.
> Restarting of pending calls is requested by setting the
> SA_RESTART bit in sa_flags. The affected system calls
> include open(2), read(2), write(2), sendto(2),
> recvfrom(2), sendmsg(2) and recvmsg(2) on a communications
> channel or a slow device (such as a terminal, but not a
> regular file) and during a wait(2) or ioctl(2). However,
> calls that have already committed are not restarted, but
> instead return a partial success (for example, a short
> read count).
>
> After a fork(2) or vfork(2) all signals, the signal mask,
> the signal stack, and the restart/interrupt flags are
> inherited by the child.
>
> The execve(2) system call reinstates the default action
> for all signals which were caught and resets all signals
> to be caught on the user stack. Ignored signals remain
> ignored; the signal mask remains the same; signals that
> restart pending system calls continue to do so.