bufp->ps_utime = ps_proc[p_ki].p_user_time;
bufp->ps_stime = ps_proc[p_ki].p_sys_time;
- bufp->ps_procargs = ps_mproc[p_nr].mp_procargs;
+ bufp->ps_procargs = ps_mproc[p_nr].mp_frame_addr;
if (bufp->ps_state == Z_STATE)
bufp->ps_args = "<defunct>";
* - take care of setuid and setgid bits
* - fix up 'mproc' table
* - tell kernel about EXEC
- * - save offset to initial argc (for ps)
+ * - save offset to initial argc (for procfs)
*
* The entry points into this file are:
* do_exec: perform the EXEC system call
strncpy(rmp->mp_name, args.progname, PROC_NAME_LEN-1);
rmp->mp_name[PROC_NAME_LEN-1] = '\0';
- /* Save offset to initial argc (for ps) */
- rmp->mp_procargs = (vir_bytes) stack_top - args.args_bytes;
+ /* Save offset to initial argc (for procfs) */
+ rmp->mp_frame_addr = (vir_bytes) stack_top - args.args_bytes;
+ rmp->mp_frame_len = args.args_bytes;
/* Kill process if something goes wrong after this point. */
rmp->mp_flags |= PARTIAL_EXEC;
check_sig(rmp->mp_pid, sn, FALSE /* ksig */);
}
- new_sp= (char *)rmp->mp_procargs;
+ new_sp= (char *)rmp->mp_frame_addr;
r= sys_exec(rmp->mp_endpoint, new_sp, rmp->mp_name, pc);
if (r != OK) panic("sys_exec failed: %d", r);
}
unsigned mp_flags; /* flag bits */
unsigned mp_trace_flags; /* trace options */
- vir_bytes mp_procargs; /* ptr to proc's initial stack arguments */
message mp_reply; /* reply message to be sent to one */
+ /* Process execution frame. Both fields are used by procfs. */
+ vir_bytes mp_frame_addr; /* ptr to proc's initial stack arguments */
+ size_t mp_frame_len; /* size of proc's initial stack arguments */
+
/* Scheduling priority. */
signed int mp_nice; /* nice is PRIO_MIN..PRIO_MAX, standard 0. */