NetBSD-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: cannot start detached sessions (with -m -d) back to back

On Tue, 4 Jan 2022, Christos Zoulas wrote:

Isn't t_rawcv used only during the open? (t_rawcvf is used in write,
and t_outcvf is used in read).

I figured it as `t_rawcv':

In the slave:
tty_pty.c:ptsread() calls ttread():

    479         } else if (tp->t_oproc)
    480                 error = (*tp->t_linesw->l_read)(tp, uio, flag);

tty.c:ttread() sleeps on `t_rawcv' (this is the master-side in PTYs, of

   1992                 error = ttysleep(tp, &tp->t_rawcv, true, slp);
   1993                 mutex_spin_exit(&tty_lock);

And, in the PTY-master:

    810                            (tp->t_canq.c_cc > 0 || !canon)) {
    811                                 cv_broadcast(&tp->t_rawcv);

I haven't goofed this, I hope...


Home | Main Index | Thread Index | Old Index