Comment 253 for bug 554172

Revision history for this message
Scott James Remnant (Canonical) (canonical-scott) wrote : Re: system services not starting at boot

Another point to consider (I discussed this with a few people here at LinuxCon):

open() is supposed to be an inherently blocking system call, just like connect(), creat(), etc. If the kernel hasn't finished hanging up the tty from last time, it's *okay* for the subsequent open() to block for a while while it hangs up the tty and reinitializes it. The app will be expecting that.

If the app calls open() with the O_NONBLOCK flag, which it accepts today already, then it's a non-blocking open - and in that case it would be acceptable for the kernel to fail the open with the EAGAIN or EWOULDBLOCK error - *NOT* EIO.

(not EIO because it turns out that that error code is already returned in some cases to indicate filesystem corruption or disk error, neither of which are transient and acceptable to loop on)