Deleted Added
full compact
tty.c (111119) tty.c (111585)
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.

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

39 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
40 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
41 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
42 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
43 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
44 * SUCH DAMAGE.
45 *
46 * @(#)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.

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

39 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
40 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
41 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
42 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
43 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
44 * SUCH DAMAGE.
45 *
46 * @(#)tty.c 8.8 (Berkeley) 1/21/94
47 * $FreeBSD: head/sys/kern/tty.c 111119 2003-02-19 05:47:46Z imp $
47 * $FreeBSD: head/sys/kern/tty.c 111585 2003-02-27 02:05:19Z julian $
48 */
49
50/*-
51 * TODO:
52 * o Fix races for sending the start char in ttyflush().
53 * o Handle inter-byte timeout for "MIN > 0, TIME > 0" in ttyselect().
54 * With luck, there will be MIN chars before select() returns().
55 * o Handle CLOCAL consistently for ptys. Perhaps disallow setting it.

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

2402
2403 /* Pick interesting process. */
2404 for (pick = NULL; p != 0; p = LIST_NEXT(p, p_pglist))
2405 if (proc_compare(pick, p))
2406 pick = p;
2407 PGRP_UNLOCK(tp->t_pgrp);
2408
2409 td = FIRST_THREAD_IN_PROC(pick);
48 */
49
50/*-
51 * TODO:
52 * o Fix races for sending the start char in ttyflush().
53 * o Handle inter-byte timeout for "MIN > 0, TIME > 0" in ttyselect().
54 * With luck, there will be MIN chars before select() returns().
55 * o Handle CLOCAL consistently for ptys. Perhaps disallow setting it.

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

2402
2403 /* Pick interesting process. */
2404 for (pick = NULL; p != 0; p = LIST_NEXT(p, p_pglist))
2405 if (proc_compare(pick, p))
2406 pick = p;
2407 PGRP_UNLOCK(tp->t_pgrp);
2408
2409 td = FIRST_THREAD_IN_PROC(pick);
2410 if (pick->p_flag & P_KSES) {
2410 if (pick->p_flag & P_THREADED) {
2411 stmp = "KSE" ; /* XXXKSE */
2412 } else {
2413 if (td) {
2414 if (TD_ON_RUNQ(td) ||
2415 (TD_IS_RUNNING(td))) {
2416 stmp = "running";
2417 } else if (TD_ON_LOCK(td)) {
2418 stmp = td->td_lockname;

--- 296 unchanged lines hidden ---
2411 stmp = "KSE" ; /* XXXKSE */
2412 } else {
2413 if (td) {
2414 if (TD_ON_RUNQ(td) ||
2415 (TD_IS_RUNNING(td))) {
2416 stmp = "running";
2417 } else if (TD_ON_LOCK(td)) {
2418 stmp = td->td_lockname;

--- 296 unchanged lines hidden ---