Skip to content
Snippets Groups Projects
  • Henrik (Grubba) Grubbström's avatar
    15f49f16
    I/O [NT]: Keep track of processes using ConPTY slaves. · 15f49f16
    Henrik (Grubba) Grubbström authored
    Due to the way that ptys are implemented on NT, the master side
    read pipe will not receive an EOF when all clients have terminated
    (since the ConPTY process is still running).
    
    We now keep track of the processes and kill the ConPTY when all
    the processes using the slave side are gone. Note that this is
    NOT 100% (or even 80%) safe. Indirect processes may still be
    running, or processes may terminate after we have already entered
    a blocking read().
    
    A feature request has been registered with the Windows Terminal
    team (https://github.com/microsoft/terminal/issues/4564).
    15f49f16
    History
    I/O [NT]: Keep track of processes using ConPTY slaves.
    Henrik (Grubba) Grubbström authored
    Due to the way that ptys are implemented on NT, the master side
    read pipe will not receive an EOF when all clients have terminated
    (since the ConPTY process is still running).
    
    We now keep track of the processes and kill the ConPTY when all
    the processes using the slave side are gone. Note that this is
    NOT 100% (or even 80%) safe. Indirect processes may still be
    running, or processes may terminate after we have already entered
    a blocking read().
    
    A feature request has been registered with the Windows Terminal
    team (https://github.com/microsoft/terminal/issues/4564).