pty.c (51658) | pty.c (51791) |
---|---|
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 51658 1999-09-25 18:24:47Z phk $ | 34 * $FreeBSD: head/sys/kern/tty_pty.c 51791 1999-09-29 15:03:48Z marcel $ |
35 */ 36 37/* 38 * Pseudo-teletype Driver 39 * (Actually two drivers, requiring two entries in 'cdevsw') 40 */ 41#include "pty.h" /* XXX */ 42#include "opt_compat.h" --- 195 unchanged lines hidden (view full) --- 238 struct proc *p = curproc; 239 register struct tty *tp = dev->si_tty; 240 register struct pt_ioctl *pti = dev->si_drv1; 241 int error = 0; 242 243again: 244 if (pti->pt_flags & PF_REMOTE) { 245 while (isbackground(p, tp)) { | 35 */ 36 37/* 38 * Pseudo-teletype Driver 39 * (Actually two drivers, requiring two entries in 'cdevsw') 40 */ 41#include "pty.h" /* XXX */ 42#include "opt_compat.h" --- 195 unchanged lines hidden (view full) --- 238 struct proc *p = curproc; 239 register struct tty *tp = dev->si_tty; 240 register struct pt_ioctl *pti = dev->si_drv1; 241 int error = 0; 242 243again: 244 if (pti->pt_flags & PF_REMOTE) { 245 while (isbackground(p, tp)) { |
246 if ((p->p_sigignore & sigmask(SIGTTIN)) || 247 (p->p_sigmask & sigmask(SIGTTIN)) || 248 p->p_pgrp->pg_jobc == 0 || 249 p->p_flag & P_PPWAIT) | 246 if (SIGISMEMBER(p->p_sigignore, SIGTTIN) || 247 SIGISMEMBER(p->p_sigmask, SIGTTIN) || 248 p->p_pgrp->pg_jobc == 0 || p->p_flag & P_PPWAIT) |
250 return (EIO); 251 pgsignal(p->p_pgrp, SIGTTIN, 1); 252 error = ttysleep(tp, &lbolt, TTIPRI | PCATCH, "ptsbg", 253 0); 254 if (error) 255 return (error); 256 } 257 if (tp->t_canq.c_cc == 0) { --- 566 unchanged lines hidden --- | 249 return (EIO); 250 pgsignal(p->p_pgrp, SIGTTIN, 1); 251 error = ttysleep(tp, &lbolt, TTIPRI | PCATCH, "ptsbg", 252 0); 253 if (error) 254 return (error); 255 } 256 if (tp->t_canq.c_cc == 0) { --- 566 unchanged lines hidden --- |