Problem with lockf on SunOS 3.5

Guy Harris auspex!guy at uunet.uu.net
Thu Jul 6 04:40:56 AEST 1989


>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 <exiting> 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. 



More information about the Comp.sys.sun mailing list