Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!cornell!uw-beaver!rice!sun-spots-request From: auspex!guy@uunet.uu.net (Guy Harris) Newsgroups: comp.sys.sun Subject: Re: Problem with lockf on SunOS 3.5 Keywords: SunOS Message-ID: <316@brazos.Rice.edu> Date: 5 Jul 89 18:40:56 GMT Sender: news@rice.edu Organization: Sun-Spots Lines: 17 Approved: Sun-Spots@rice.edu X-Sun-Spots-Digest: Volume 8, Issue 80, message 1 of 15 >OK, so TCFLSH is one of them new-fangled termio thingies. Perhaps that >makes a difference. But as we all know, regular terminal I/O is always >interruptible by signals. Why is the tty driver sleeping rather than >waiting? Sounds like a bug somewhere. No, the problem is that the process is in the state. If it's in that state, it's not accepting signals, so even if it is sleeping at a priority above PZERO it's still not interruptable. This is pretty much inherent in the way UNIX handles the automatic "close" done for an exiting process - if such a "close" blocks, you're screwed, since there's no provision for having a device's "close" routine know that somebody's impatient and that it should therefore shut the device down even if the event it's waiting for hasn't occurred yet. You could argue that the lack of such a provision is a bug, but if it is, it's not a simple bug in a driver, it's a more fundamental deficiency.