Source-Changes-HG archive

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

[src/trunk]: src/sys/kern Fill in locators for process argv/envp data after p...



details:   https://anonhg.NetBSD.org/src/rev/152c9753ac03
branches:  trunk
changeset: 486581:152c9753ac03
user:      simonb <simonb%NetBSD.org@localhost>
date:      Fri May 26 02:24:37 2000 +0000

description:
Fill in locators for process argv/envp data after ps_strings is built.

diffstat:

 sys/kern/kern_exec.c |  9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)

diffs (23 lines):

diff -r 6209c2ab2182 -r 152c9753ac03 sys/kern/kern_exec.c
--- a/sys/kern/kern_exec.c      Fri May 26 02:23:12 2000 +0000
+++ b/sys/kern/kern_exec.c      Fri May 26 02:24:37 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: kern_exec.c,v 1.108 2000/03/30 09:27:11 augustss Exp $ */
+/*     $NetBSD: kern_exec.c,v 1.109 2000/05/26 02:24:37 simonb Exp $   */
 
 /*-
  * Copyright (C) 1993, 1994, 1996 Christopher G. Demetriou
@@ -412,6 +412,13 @@
        if (copyout(&arginfo, (char *) PS_STRINGS, sizeof(arginfo)))
                goto exec_abort;
 
+       /* fill process ps_strings info */
+       p->p_psstr = PS_STRINGS;
+       p->p_psargv = offsetof(struct ps_strings, ps_argvstr);
+       p->p_psnargv = offsetof(struct ps_strings, ps_nargvstr);
+       p->p_psenv = offsetof(struct ps_strings, ps_envstr);
+       p->p_psnenv = offsetof(struct ps_strings, ps_nenvstr);
+
        /* copy out the process's signal trapoline code */
        if (szsigcode) {
                if (copyout((char *)pack.ep_emul->e_sigcode,



Home | Main Index | Thread Index | Old Index