Source-Changes-HG archive

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

[src/nathanw_sa]: src/bin/ps Print state letter 'U' for suspended LWPs.



details:   https://anonhg.NetBSD.org/src/rev/d9f09d22c2f2
branches:  nathanw_sa
changeset: 506061:d9f09d22c2f2
user:      nathanw <nathanw%NetBSD.org@localhost>
date:      Fri Jul 26 00:03:22 2002 +0000

description:
Print state letter 'U' for suspended LWPs.
Make sure to print '+' (controlling terminal) character last.

diffstat:

 bin/ps/print.c |  16 ++++++++++++----
 1 files changed, 12 insertions(+), 4 deletions(-)

diffs (55 lines):

diff -r 1330c9cc1a5e -r d9f09d22c2f2 bin/ps/print.c
--- a/bin/ps/print.c    Fri Jul 26 00:01:48 2002 +0000
+++ b/bin/ps/print.c    Fri Jul 26 00:03:22 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: print.c,v 1.71.2.4 2002/04/24 21:42:30 nathanw Exp $   */
+/*     $NetBSD: print.c,v 1.71.2.5 2002/07/26 00:03:22 nathanw Exp $   */
 
 /*
  * Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -74,7 +74,7 @@
 #if 0
 static char sccsid[] = "@(#)print.c    8.6 (Berkeley) 4/16/94";
 #else
-__RCSID("$NetBSD: print.c,v 1.71.2.4 2002/04/24 21:42:30 nathanw Exp $");
+__RCSID("$NetBSD: print.c,v 1.71.2.5 2002/07/26 00:03:22 nathanw Exp $");
 #endif
 #endif /* not lint */
 
@@ -417,6 +417,10 @@
                is_zombie = 1;
                break;
 
+       case LSSUSPENDED:
+               *cp = 'U';
+               break;
+
        default:
                *cp = '?';
        }
@@ -441,12 +445,12 @@
                *cp++ = 'L';
        if (k->p_eflag & EPROC_SLEADER)
                *cp++ = 's';
-       if ((flag & P_CONTROLT) && k->p__pgid == k->p_tpgid)
-               *cp++ = '+';
        if (flag & P_SA)
                *cp++ = 'a';
        else if (k->p_nlwps > 1)
                *cp++ = 'l';
+       if ((flag & P_CONTROLT) && k->p__pgid == k->p_tpgid)
+               *cp++ = '+';
        *cp = '\0';
        strprintorsetwidth(v, buf, mode);
 }
@@ -494,6 +498,10 @@
                is_zombie = 1;
                break;
 
+       case LSSUSPENDED:
+               *cp = 'U';
+               break;
+
        default:
                *cp = '?';
        }



Home | Main Index | Thread Index | Old Index