lkml.org 
[lkml]   [2011]   [Oct]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectQ.: Why does tty_ioctl.c: set_termios return EINTR instead of ERESTARTSYS?
From
A student in my OS class noticed during their shell assignment that
tcsetattr() is being interrupted with EINTR even though they had set
SA_RESTART.

Upon taking a closer look, I noticed that
drivers/char/tty_ioctl.c:set_termios(), which lies on the code path
for the POSIX tcsetattr() function, returns -EINTR when a signal is
pending. Consequently, the SA_RESTART flag is not honored and user
code must check for and handle EINTR.

I don't immediately see what would prevent this system call from being
restartable.

Is there a particular reason why it cannot be made restartable?

Thank your for any insight.

 - Godmar

--
please cc: me on any replies.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2011-10-14 18:55    [W:0.294 / U:0.072 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site