Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-1-4]: src/bin/ps Pull up revision 1.37 (requested by abs):



details:   https://anonhg.NetBSD.org/src/rev/85e5a60d09e4
branches:  netbsd-1-4
changeset: 470613:85e5a60d09e4
user:      he <he%NetBSD.org@localhost>
date:      Mon May 22 21:40:32 2000 +0000

description:
Pull up revision 1.37 (requested by abs):
  Only check the terminal size via STDOUT, not STDERR or STDIN.

diffstat:

 bin/ps/ps.c |  8 +++-----
 1 files changed, 3 insertions(+), 5 deletions(-)

diffs (29 lines):

diff -r 28228260c960 -r 85e5a60d09e4 bin/ps/ps.c
--- a/bin/ps/ps.c       Mon May 22 21:38:38 2000 +0000
+++ b/bin/ps/ps.c       Mon May 22 21:40:32 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ps.c,v 1.28.2.1 1999/11/08 06:40:24 cgd Exp $  */
+/*     $NetBSD: ps.c,v 1.28.2.2 2000/05/22 21:40:32 he Exp $   */
 
 /*-
  * Copyright (c) 1990, 1993, 1994
@@ -43,7 +43,7 @@
 #if 0
 static char sccsid[] = "@(#)ps.c       8.4 (Berkeley) 4/2/94";
 #else
-__RCSID("$NetBSD: ps.c,v 1.28.2.1 1999/11/08 06:40:24 cgd Exp $");
+__RCSID("$NetBSD: ps.c,v 1.28.2.2 2000/05/22 21:40:32 he Exp $");
 #endif
 #endif /* not lint */
 
@@ -122,9 +122,7 @@
        char *ttname;
 
        (void)setegid(getgid());
-       if ((ioctl(STDOUT_FILENO, TIOCGWINSZ, (char *)&ws) == -1 &&
-            ioctl(STDERR_FILENO, TIOCGWINSZ, (char *)&ws) == -1 &&
-            ioctl(STDIN_FILENO,  TIOCGWINSZ, (char *)&ws) == -1) ||
+       if (ioctl(STDOUT_FILENO, TIOCGWINSZ, (char *)&ws) == -1 ||
             ws.ws_col == 0)
                termwidth = 79;
        else



Home | Main Index | Thread Index | Old Index