[Alan, thanks for the tips on where to instrument this]
What I have verified so far is that when the problem occurs, it gets to
this point in [tty_io.c] tty_check_change():
1229 kill_pgrp(task_pgrp(current), SIGTTOU, 1);
1230 set_thread_flag(TIF_SIGPENDING);
1231 ret = -ERESTARTSYS;
1232 out:
1233 return ret;
So the error that gets returned to set_termios() is -512.
Also, the various checks before this point (of course) did not pass
(current->signal->tty != tty, !tty->pgrp, task_pgrp(current) ==
tty->pgrp, is_ignored(SIGTTOU), is_current_pgrp_orphaned()). I have not
printed out the various values from these - let me know if this would be
helpful. I wanted to pass this info along now in case it is of help.
-Joe
--