From: Matthew Dillon Date: Sat, 21 Aug 2010 21:12:30 +0000 (-0700) Subject: kernel - minor flags coding change X-Git-Tag: v2.9.0~444 X-Git-Url: https://gitweb.dragonflybsd.org/~tuxillo/dragonfly.git/commitdiff_plain/449728b3949a3b8485001411748bf4a6fe9cd877 kernel - minor flags coding change * Use |= instead of =. The related structure was bzero'd so the effect is the same but this reduces potential confusion. --- diff --git a/sys/kern/tty_pty.c b/sys/kern/tty_pty.c index 9c1911bfc0..163dfc376b 100644 --- a/sys/kern/tty_pty.c +++ b/sys/kern/tty_pty.c @@ -302,8 +302,12 @@ pti_done(struct pt_ioctl *pti) * Interlock open attempts against termination by setting * PF_TERMINATED. This allows us to block while cleaning * out the device infrastructure. + * + * Do not terminate the tty if it still has a session + * association. */ - if ((pti->pt_flags2 & (PF_SOPEN|PF_MOPEN)) == 0) { + if ((pti->pt_flags2 & (PF_SOPEN|PF_MOPEN)) == 0 && + pti->pt_tty.t_session == NULL) { pti->pt_flags2 |= PF_TERMINATED; uminor_no = pti->pt_uminor; diff --git a/sys/kern/uipc_socket.c b/sys/kern/uipc_socket.c index a684650f09..e170714fe2 100644 --- a/sys/kern/uipc_socket.c +++ b/sys/kern/uipc_socket.c @@ -1188,7 +1188,7 @@ sorflush(struct socket *so) bzero((caddr_t)ssb, sizeof (*ssb)); if (asb.ssb_flags & SSB_KNOTE) { ssb->ssb_kq.ki_note = asb.ssb_kq.ki_note; - ssb->ssb_flags = SSB_KNOTE; + ssb->ssb_flags |= SSB_KNOTE; } crit_exit();