From 787cf415c05ca62623d6e5b0f94ff61c13eb08ad Mon Sep 17 00:00:00 2001 From: Thomas Bushnell Date: Sun, 11 Jul 1999 05:32:01 +0000 Subject: 1999-07-09 Thomas Bushnell, BSG * info.c (get_string_array): Use mmap instead of vm_allocate. (S_proc_getprocinfo): Likewise. (S_proc_getloginpids): Likewise. * mgt.c (S_proc_getallpids): Likewise. * pgrp.c (S_proc_getsessionpids): Likewise. (S_proc_getsessionpgids): Likewise. (S_proc_getpgrppids): Likewise. --- proc/pgrp.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'proc/pgrp.c') diff --git a/proc/pgrp.c b/proc/pgrp.c index 224f7e52..ecd4b6e3 100644 --- a/proc/pgrp.c +++ b/proc/pgrp.c @@ -1,5 +1,5 @@ /* Session and process group manipulation - Copyright (C) 1992, 1993, 1994, 1995, 1996 Free Software Foundation, Inc. + Copyright (C) 1992, 1993, 1994, 1995, 1996, 1999 Free Software Foundation, Inc. This file is part of the GNU Hurd. @@ -174,8 +174,8 @@ S_proc_getsessionpids (struct proc *callerp, if (count > npids) /* They didn't all fit */ { - vm_allocate (mach_task_self (), (vm_address_t *)pids, - count * sizeof (pid_t), 1); + *pids = mmap (0, count * sizeof (pid_t), PROT_READ|PROT_WRITE, + MAP_ANON, 0, 0); pp = *pids; for (pg = s->s_pgrps; pg; pg = pg->pg_next) for (p = pg->pg_plist; p; p = p->p_gnext) @@ -214,8 +214,8 @@ S_proc_getsessionpgids (struct proc *callerp, if (count > npgids) /* They didn't all fit. */ { - vm_allocate (mach_task_self (), (vm_address_t *)pgids, - count * sizeof (pid_t), 1); + *pgids = mmap (0, count * sizeof (pid_t), PROT_READ|PROT_WRITE, + MAP_ANON, 0, 0); pp = *pgids; for (pg = s->s_pgrps; pg; pg = pg->pg_next) *pp++ = pg->pg_pgid; @@ -257,8 +257,8 @@ S_proc_getpgrppids (struct proc *callerp, if (count > npids) /* They didn't all fit. */ { - vm_allocate (mach_task_self (), (vm_address_t *)pids, - count * sizeof (pid_t), 1); + *pids = mmap (0, count * sizeof (pid_t), PROT_READ|PROT_WRITE, + MAP_ANON, 0, 0); pp = *pids; for (p = pg->pg_plist; p; p = p->p_gnext) *pp++ = p->p_pid; -- cgit v1.2.3