diff options
| author | svn2git <svn2git@FreeBSD.org> | 1994-05-01 08:00:00 +0000 |
|---|---|---|
| committer | svn2git <svn2git@FreeBSD.org> | 1994-05-01 08:00:00 +0000 |
| commit | a16f65c7d117419bd266c28a1901ef129a337569 (patch) | |
| tree | 2626602f66dc3551e7a7c7bc9ad763c3bc7ab40a /usr.bin/w | |
| parent | 8503f4f13f77abf7adc8f7e329c6f9c1d52b6a20 (diff) | |
Release FreeBSD 1.1upstream/1.1.0_cvsrelease/1.1.0_cvs
This commit was manufactured to restore the state of the 1.1-RELEASE image.
Releases prior to 5.3-RELEASE are omitting the secure/ and crypto/ subdirs.
Diffstat (limited to 'usr.bin/w')
| -rw-r--r-- | usr.bin/w/w.c | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/usr.bin/w/w.c b/usr.bin/w/w.c index 44625b05568c..c24b88502b05 100644 --- a/usr.bin/w/w.c +++ b/usr.bin/w/w.c @@ -289,11 +289,15 @@ main(argc, argv) if (argwidth < 4) argwidth = 8; for (ep = ehead; ep != NULL; ep = ep->next) { - ep->args = strdup(kvm_getargs(ep->proc, kvm_getu(ep->proc))); - if (ep->args == NULL) { - error("out of memory"); - exit(1); + if(ep->proc != NULL) { + ep->args = strdup(kvm_getargs(ep->proc, kvm_getu(ep->proc))); + if (ep->args == NULL) { + error("out of memory"); + exit(1); + } } + + } /* sort by idle time */ if (sortidle && ehead != NULL) { @@ -326,7 +330,10 @@ main(argc, argv) printf(" - "); else prttime(ep->idle, " "); - printf("%.*s\n", argwidth, ep->args); + if(ep->args) + printf("%.*s\n", argwidth, ep->args); + else + printf("-\n"); } exit(0); } |
