tradindexed - Interrupted system call
rra at stanford.edu
Mon Jan 8 14:31:10 UTC 2001
Mirek Luc <mirecki at nask.pl> writes:
> The open() system call can be interrupted by _any_ signal and then it
> returns with errno==EINTR. NFS or non-NFS environment... It doesn't
> matter. All of the I/O system functions take a "long" time so they are
> interruptibl by signals.
Not according to Stevens. Stevens specifically says that the only open
calls that are considered slow are opens that block until some condition
occurs (such as an open of a terminal device that waits for a modem
connection). An open of a normal disk file is not a slow system call and
shouldn't be interrupted by signals. APUE, pg. 276.
Of course, Solaris breaks all sorts of things that other Unixes guarantee
(reads and writes from disk files should also never be interrupted by
signals, and futhermore should be restarted even if they are interrupted
since read and write are among the list of system calls that are
automatically restarted when signals are set that way).
NFS may be a reasonable excuse, but I still think it's an operating system
bug. If it occurs with a regular disk file without NFS in the picture,
it's *definitely* an operating system bug.
Russ Allbery (rra at stanford.edu) <http://www.eyrie.org/~eagle/>
More information about the inn-workers