Not logged in
Log in now
Create an account
Subscribe to LWN
LWN.net Weekly Edition for December 5, 2013
Deadline scheduling: coming soon?
LWN.net Weekly Edition for November 27, 2013
ACPI for ARM?
LWN.net Weekly Edition for November 21, 2013
But in general I agree - signals make it very hard to write correct programs.
A brief history of union mounts
Posted Jul 24, 2010 18:16 UTC (Sat) by nix (subscriber, #2304)
(Also, POSIX doesn't ban getting EINTR on reads from a regular file, so prudence dictates expecting it.)
Posted Jul 25, 2010 4:20 UTC (Sun) by neilbrown (subscriber, #359)
Posix has a concept of 'slow' and 'not slow' reads where 'slow' reads can result in a short read or EINTR, and disk IO is explcitly not a slow read. So if your file is on disk you cannot get EINTR.
I guess being on disk on another machine doesn't count. :-(
Posted Jul 31, 2010 20:27 UTC (Sat) by nix (subscriber, #2304)
Now perhaps this is a de facto universal implementation detail, but as far as I can see it isn't in POSIX itself. (Maybe I just haven't looked in the right place?)
Posted Aug 1, 2010 10:01 UTC (Sun) by neilbrown (subscriber, #359)
appears to allow any read to be interrupted, and says in the "informative" section "The issue of which files or file types are interruptible is considered an implementation design issue. This is often affected primarily by hardware and reliability issues." which is singularly unhelpful.
I was basing my statements on "man 7 signal" which does talk about "slow" devices. Clearly this isn't normative....
As you say, POSIX by itself is enough to make one wince...
Posted Aug 4, 2010 22:45 UTC (Wed) by nix (subscriber, #2304)
Even 'man 7 signal' says clearly that 'The details vary across Unix systems; below, the details for Linux', and that's not terribly useful really for the vast majority of software. (I suppose you can rely on it in mdadm ;} )
Copyright © 2013, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds