]> git.baikalelectronics.ru Git - kernel.git/commit
VT_WAITACTIVE: Avoid returning EINTR when not necessary
authorLinus Torvalds <torvalds@woody.linux-foundation.org>
Sun, 7 Oct 2007 23:02:55 +0000 (16:02 -0700)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Sun, 7 Oct 2007 23:02:55 +0000 (16:02 -0700)
commit70c93eb5ca798c921a58cbae22a3b4bf37c3ab24
tree089c5c2098888492c8d54c2d0c52772a64db8423
parent5fb16571221c7f49db9021ea312599987e4a2263
VT_WAITACTIVE: Avoid returning EINTR when not necessary

We should generally prefer to return ERESTARTNOHAND rather than EINTR,
so that processes with unhandled signals that get ignored don't return
EINTR.

This can help with X startup issues:

    Fatal server error:
    xf86OpenConsole: VT_WAITACTIVE failed: Interrupted system call

although the real fix is having the X server always retry EINTR
regardless (since EINTR does happen for signals that have handlers
installed). Keithp has a patch for that.

Regardless, ERESTARTNOHAND is the correct thing to use.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/char/vt_ioctl.c