Commit:     70cb97935b8859f27296772885104b599f560576
Parent:     fc8b28a65d81a6fdf58ef81ce5b8ac7a35304e68
Author:     Linus Torvalds <[EMAIL PROTECTED]>
AuthorDate: Sun Oct 7 16:02:55 2007 -0700
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Sun Oct 7 16:02:55 2007 -0700

    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
    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 <[EMAIL PROTECTED]>
 drivers/char/vt_ioctl.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/char/vt_ioctl.c b/drivers/char/vt_ioctl.c
index c799b7f..7a61a2a 100644
--- a/drivers/char/vt_ioctl.c
+++ b/drivers/char/vt_ioctl.c
@@ -1032,7 +1032,7 @@ static DECLARE_WAIT_QUEUE_HEAD(vt_activate_queue);
  * Sleeps until a vt is activated, or the task is interrupted. Returns
- * 0 if activation, -EINTR if interrupted.
+ * 0 if activation, -EINTR if interrupted by a signal handler.
 int vt_waitactive(int vt)
@@ -1057,7 +1057,7 @@ int vt_waitactive(int vt)
-               retval = -EINTR;
+               retval = -ERESTARTNOHAND;
                if (signal_pending(current))
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at

Reply via email to