summaryrefslogtreecommitdiffstats
path: root/sys/kern/kern_exec.c
diff options
context:
space:
mode:
authorpeter <peter@FreeBSD.org>1995-12-09 04:29:11 +0000
committerpeter <peter@FreeBSD.org>1995-12-09 04:29:11 +0000
commit7a5ae2aa829c8cb84641e04880f095e59ff32182 (patch)
tree3de7d7ce0562ddc16bed53d875d78c35a6f50986 /sys/kern/kern_exec.c
parenta69d1dfbcb7bc187703b1767f289aba2bd4edbb6 (diff)
downloadFreeBSD-src-7a5ae2aa829c8cb84641e04880f095e59ff32182.zip
FreeBSD-src-7a5ae2aa829c8cb84641e04880f095e59ff32182.tar.gz
Reorganise ps_strings in order to gain BSD/OS 2.0 binary compatability.
This is now in line with NetBSD as well.. Note that once this series of commits is finished, you must recompile libkvm, then ps and maybe 'w'. If you are running the recently imported sendmail-8.7, you should recompile that too (src/conf.c at least).
Diffstat (limited to 'sys/kern/kern_exec.c')
-rw-r--r--sys/kern/kern_exec.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/sys/kern/kern_exec.c b/sys/kern/kern_exec.c
index 2b01960..c8d22c6 100644
--- a/sys/kern/kern_exec.c
+++ b/sys/kern/kern_exec.c
@@ -28,7 +28,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: kern_exec.c,v 1.27 1995/11/13 10:45:22 davidg Exp $
+ * $Id: kern_exec.c,v 1.28 1995/12/07 12:46:40 davidg Exp $
*/
#include <sys/param.h>
@@ -451,7 +451,9 @@ exec_copyout_strings(imgp)
* Calculate string base and vector table pointers.
*/
arginfo = PS_STRINGS;
- destp = (caddr_t)arginfo - roundup((ARG_MAX - imgp->stringspace), sizeof(char *));
+ destp = (caddr_t)arginfo - SPARE_USRSPACE -
+ roundup((ARG_MAX - imgp->stringspace), sizeof(char *));
+
/*
* The '+ 2' is for the null pointers at the end of each of the
* arg and env vector sets
@@ -476,7 +478,7 @@ exec_copyout_strings(imgp)
/*
* Fill in "ps_strings" struct for ps, w, etc.
*/
- suword(&arginfo->ps_argvstr, (int)destp);
+ suword(&arginfo->ps_argvstr, (int)vectp);
suword(&arginfo->ps_nargvstr, argc);
/*
@@ -492,7 +494,7 @@ exec_copyout_strings(imgp)
/* a null vector table pointer seperates the argp's from the envp's */
suword(vectp++, NULL);
- suword(&arginfo->ps_envstr, (int)destp);
+ suword(&arginfo->ps_envstr, (int)vectp);
suword(&arginfo->ps_nenvstr, envc);
/*
OpenPOWER on IntegriCloud