pty.c (91406) | pty.c (91565) |
---|---|
1/* 2 * Copyright (c) 1982, 1986, 1989, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 17 unchanged lines hidden (view full) --- 26 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 31 * SUCH DAMAGE. 32 * 33 * @(#)tty_pty.c 8.4 (Berkeley) 2/20/95 | 1/* 2 * Copyright (c) 1982, 1986, 1989, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 17 unchanged lines hidden (view full) --- 26 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 31 * SUCH DAMAGE. 32 * 33 * @(#)tty_pty.c 8.4 (Berkeley) 2/20/95 |
34 * $FreeBSD: head/sys/kern/tty_pty.c 91406 2002-02-27 18:32:23Z jhb $ | 34 * $FreeBSD: head/sys/kern/tty_pty.c 91565 2002-03-02 12:42:24Z tanimura $ |
35 */ 36 37/* 38 * Pseudo-teletype Driver 39 * (Actually two drivers, requiring two entries in 'cdevsw') 40 */ 41#include "opt_compat.h" 42#include <sys/param.h> --- 197 unchanged lines hidden (view full) --- 240 if (pti->pt_flags & PF_REMOTE) { 241 while (isbackground(p, tp)) { 242 PGRPSESS_SLOCK(); 243 PROC_LOCK(p); 244 if (SIGISMEMBER(p->p_sigignore, SIGTTIN) || 245 SIGISMEMBER(p->p_sigmask, SIGTTIN) || 246 p->p_pgrp->pg_jobc == 0 || p->p_flag & P_PPWAIT) { 247 PROC_UNLOCK(p); | 35 */ 36 37/* 38 * Pseudo-teletype Driver 39 * (Actually two drivers, requiring two entries in 'cdevsw') 40 */ 41#include "opt_compat.h" 42#include <sys/param.h> --- 197 unchanged lines hidden (view full) --- 240 if (pti->pt_flags & PF_REMOTE) { 241 while (isbackground(p, tp)) { 242 PGRPSESS_SLOCK(); 243 PROC_LOCK(p); 244 if (SIGISMEMBER(p->p_sigignore, SIGTTIN) || 245 SIGISMEMBER(p->p_sigmask, SIGTTIN) || 246 p->p_pgrp->pg_jobc == 0 || p->p_flag & P_PPWAIT) { 247 PROC_UNLOCK(p); |
248 PGRPSESS_SUNLOCK(); |
|
248 return (EIO); 249 } 250 PROC_UNLOCK(p); 251 PGRP_LOCK(p->p_pgrp); 252 PGRPSESS_SUNLOCK(); 253 pgsignal(p->p_pgrp, SIGTTIN, 1); 254 PGRP_UNLOCK(p->p_pgrp); 255 error = ttysleep(tp, &lbolt, TTIPRI | PCATCH, "ptsbg", --- 616 unchanged lines hidden --- | 249 return (EIO); 250 } 251 PROC_UNLOCK(p); 252 PGRP_LOCK(p->p_pgrp); 253 PGRPSESS_SUNLOCK(); 254 pgsignal(p->p_pgrp, SIGTTIN, 1); 255 PGRP_UNLOCK(p->p_pgrp); 256 error = ttysleep(tp, &lbolt, TTIPRI | PCATCH, "ptsbg", --- 616 unchanged lines hidden --- |