Deleted Added
full compact
tty.c (91199) tty.c (91565)
1/*-
2 * Copyright (c) 1982, 1986, 1990, 1991, 1993
3 * The Regents of the University of California. All rights reserved.
4 * (c) UNIX System Laboratories, Inc.
5 * All or some portions of this file are derived from material licensed
6 * to the University of California by American Telephone and Telegraph
7 * Co. or Unix System Laboratories, Inc. and are reproduced herein with
8 * the permission of UNIX System Laboratories, Inc.

--- 22 unchanged lines hidden (view full) ---

31 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
32 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
33 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
34 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
35 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
36 * SUCH DAMAGE.
37 *
38 * @(#)tty.c 8.8 (Berkeley) 1/21/94
1/*-
2 * Copyright (c) 1982, 1986, 1990, 1991, 1993
3 * The Regents of the University of California. All rights reserved.
4 * (c) UNIX System Laboratories, Inc.
5 * All or some portions of this file are derived from material licensed
6 * to the University of California by American Telephone and Telegraph
7 * Co. or Unix System Laboratories, Inc. and are reproduced herein with
8 * the permission of UNIX System Laboratories, Inc.

--- 22 unchanged lines hidden (view full) ---

31 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
32 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
33 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
34 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
35 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
36 * SUCH DAMAGE.
37 *
38 * @(#)tty.c 8.8 (Berkeley) 1/21/94
39 * $FreeBSD: head/sys/kern/tty.c 91199 2002-02-24 19:56:41Z phk $
39 * $FreeBSD: head/sys/kern/tty.c 91565 2002-03-02 12:42:24Z tanimura $
40 */
41
42/*-
43 * TODO:
44 * o Fix races for sending the start char in ttyflush().
45 * o Handle inter-byte timeout for "MIN > 0, TIME > 0" in ttyselect().
46 * With luck, there will be MIN chars before select() returns().
47 * o Handle CLOCAL consistently for ptys. Perhaps disallow setting it.

--- 727 unchanged lines hidden (view full) ---

775 !SIGISMEMBER(p->p_sigmask, SIGTTOU)) {
776 if (p->p_pgrp->pg_jobc == 0) {
777 PROC_UNLOCK(p);
778 PGRPSESS_SUNLOCK();
779 return (EIO);
780 }
781 PROC_UNLOCK(p);
782 PGRP_LOCK(p->p_pgrp);
40 */
41
42/*-
43 * TODO:
44 * o Fix races for sending the start char in ttyflush().
45 * o Handle inter-byte timeout for "MIN > 0, TIME > 0" in ttyselect().
46 * With luck, there will be MIN chars before select() returns().
47 * o Handle CLOCAL consistently for ptys. Perhaps disallow setting it.

--- 727 unchanged lines hidden (view full) ---

775 !SIGISMEMBER(p->p_sigmask, SIGTTOU)) {
776 if (p->p_pgrp->pg_jobc == 0) {
777 PROC_UNLOCK(p);
778 PGRPSESS_SUNLOCK();
779 return (EIO);
780 }
781 PROC_UNLOCK(p);
782 PGRP_LOCK(p->p_pgrp);
783 PGRPSESS_SUNLOCK();
783 pgsignal(p->p_pgrp, SIGTTOU, 1);
784 PGRP_UNLOCK(p->p_pgrp);
785 error = ttysleep(tp, &lbolt, TTOPRI | PCATCH, "ttybg1",
786 0);
784 pgsignal(p->p_pgrp, SIGTTOU, 1);
785 PGRP_UNLOCK(p->p_pgrp);
786 error = ttysleep(tp, &lbolt, TTOPRI | PCATCH, "ttybg1",
787 0);
787 if (error) {
788 PGRPSESS_SUNLOCK();
788 if (error)
789 return (error);
789 return (error);
790 }
790 PGRPSESS_SLOCK();
791 PROC_LOCK(p);
792 }
793 PROC_UNLOCK(p);
794 PGRPSESS_SUNLOCK();
795 break;
796 }
797
798 switch (cmd) { /* Process the ioctl. */

--- 1885 unchanged lines hidden ---
791 PROC_LOCK(p);
792 }
793 PROC_UNLOCK(p);
794 PGRPSESS_SUNLOCK();
795 break;
796 }
797
798 switch (cmd) { /* Process the ioctl. */

--- 1885 unchanged lines hidden ---