From 8735cebc6470b650ec3d064f1644b09084d3be38 Mon Sep 17 00:00:00 2001 From: Peter Wemm Date: Mon, 1 Jan 1996 17:01:03 +0000 Subject: [PATCH] fill in kinfo_eproc.e_login - otherwise a sysctl to read the eprocs wont get the login names, and "ps -ax -O login" will return an empty column under the login name. --- sys/kern/kern_proc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sys/kern/kern_proc.c b/sys/kern/kern_proc.c index 2d762965210f..4fbb0c489798 100644 --- a/sys/kern/kern_proc.c +++ b/sys/kern/kern_proc.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)kern_proc.c 8.4 (Berkeley) 1/4/94 - * $Id: kern_proc.c,v 1.13 1995/12/07 12:46:47 davidg Exp $ + * $Id: kern_proc.c,v 1.14 1995/12/14 08:31:30 phk Exp $ */ #include @@ -464,6 +464,8 @@ fill_eproc(p, ep) ep->e_pgid = p->p_pgrp->pg_id; ep->e_jobc = p->p_pgrp->pg_jobc; } + if (ep->e_sess) + bcopy(ep->e_sess->s_login, ep->e_login, sizeof(ep->e_login)); if ((p->p_flag & P_CONTROLT) && (ep->e_sess != NULL) && ((tp = ep->e_sess->s_ttyp) != NULL)) {