Re: Q.: Why does tty_ioctl.c: set_termios return EINTR instead ofERESTARTSYS?

From: Alan Cox
Date: Sat Oct 15 2011 - 05:26:26 EST


Is there a particular reason why it cannot be made restartable?
>
> EINTR is used when there is no way to rollback already performed
> actions. In this case, a flush could be performed. (This holds only for
> TCSETSF, TCSETSF2 and similar.) So I think this is the reason we cannot
> return ERESTARTSYS.
>
> However I CCed tty fellows, they may have a different opinion.

I don't actually know. I think Linus or Ted T'so were still doing the tty
code that long back. Ted also did some compliance testing on it way back
when (1995 or so ?)
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/