git: kernel: reset the tty drain timeout after a session exits

Antonio Huete Jimenez tuxillo at crater.dragonflybsd.org
Tue Nov 17 15:41:04 PST 2026


commit 3351c65f801406e0674894918d8533855ece0a5d
Author: Antonio Huete Jimenez <tuxillo at quantumachine.net>
Date:   Tue Nov 17 23:57:48 2026 +0100

    kernel: reset the tty drain timeout after a session exits
    
    exit1() forces t_timeout to one second while it drains the
    controlling terminal of an exiting session leader, and leaves it
    there. The tty outlives the session, so the next session on it (a
    reused pty) gets EIO from any write that waits more than a second for
    output space. dsynth runs into this, with gmake failing with "write
    error: stdout".
    
    Reset it to 0, the default, after ttywait(). Restoring the old value
    would also carry over a timeout the session set with TIOCSDRAINWAIT.
    
    Bug: https://bugs.dragonflybsd.org/issues/3469

Summary of changes:
 sys/kern/kern_exit.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/3351c65f801406e0674894918d8533855ece0a5d


-- 
DragonFly BSD source repository


More information about the Commits mailing list