Small cleanup in pm_init.
*
* The entry points into this file are:
* do_fork: perform the FORK system call
- * do_mm_exit: perform the EXIT system call (by calling mm_exit())
- * mm_exit: actually do the exiting
+ * do_pm_exit: perform the EXIT system call (by calling pm_exit())
+ * pm_exit: actually do the exiting
* do_wait: perform the WAITPID or WAIT system call
*/
/*===========================================================================*
- * do_mm_exit *
+ * do_pm_exit *
*===========================================================================*/
-PUBLIC int do_mm_exit()
+PUBLIC int do_pm_exit()
{
-/* Perform the exit(status) system call. The real work is done by mm_exit(),
+/* Perform the exit(status) system call. The real work is done by pm_exit(),
* which is also called when a process is killed by a signal.
*/
- mm_exit(mp, m_in.status);
+ pm_exit(mp, m_in.status);
return(SUSPEND); /* can't communicate from beyond the grave */
}
/*===========================================================================*
- * mm_exit *
+ * pm_exit *
*===========================================================================*/
-PUBLIC void mm_exit(rmp, exit_status)
+PUBLIC void pm_exit(rmp, exit_status)
register struct mproc *rmp; /* pointer to the process to be terminated */
int exit_status; /* the process' exit status (for parent) */
{
static char core_sigs[] = { SIGQUIT, SIGILL, SIGTRAP, SIGABRT,
SIGEMT, SIGFPE, SIGUSR1, SIGSEGV, SIGUSR2 };
static char ign_sigs[] = { SIGCHLD };
- static int protected[] = {PM_PROC_NR, FS_PROC_NR, SM_PROC_NR,
- TTY_PROC_NR, DRVR_PROC_NR, MEM_PROC_NR};
register struct mproc *rmp;
register char *sig_ptr;
phys_clicks total_clicks, minix_clicks, free_clicks;
/* Set process details found in the image table. */
rmp = &mproc[ip->proc_nr];
strncpy(rmp->mp_name, ip->proc_name, PROC_NAME_LEN);
+ rmp->mp_parent = SM_PROC_NR;
if (ip->proc_nr == INIT_PROC_NR) { /* user process */
rmp->mp_pid = INIT_PID;
- rmp->mp_parent = PM_PROC_NR;
rmp->mp_flags |= IN_USE;
- rmp->mp_nice = 0;
- sigemptyset(&rmp->mp_ignore);
+ sigemptyset(&rmp->mp_ignore);
}
else { /* system process */
rmp->mp_pid = get_free_pid();
- rmp->mp_parent = SM_PROC_NR;
rmp->mp_flags |= IN_USE | DONT_SWAP | PRIV_PROC;
- sigfillset(&rmp->mp_ignore);
+ sigfillset(&rmp->mp_ignore);
}
sigemptyset(&rmp->mp_sigmask);
sigemptyset(&rmp->mp_catch);
/* Override some details. PM is somewhat special. */
mproc[PM_PROC_NR].mp_pid = PM_PID; /* magically override pid */
mproc[PM_PROC_NR].mp_parent = PM_PROC_NR; /* PM doesn't have parent */
- for (i=0; i<sizeof(protected)/sizeof(int); i++)
- sigfillset(&mproc[i].mp_ignore); /* guard against signals */
-
/* Tell FS that no more system processes follow and synchronize. */
mess.PR_PROC_NR = NONE;
/* forkexit.c */
_PROTOTYPE( int do_fork, (void) );
-_PROTOTYPE( int do_mm_exit, (void) );
+_PROTOTYPE( int do_pm_exit, (void) );
_PROTOTYPE( int do_waitpid, (void) );
-_PROTOTYPE( void mm_exit, (struct mproc *rmp, int exit_status) );
+_PROTOTYPE( void pm_exit, (struct mproc *rmp, int exit_status) );
/* getset.c */
_PROTOTYPE( int do_getset, (void) );
tell_fs(CHDIR, slot, FALSE, 0);
dump_core(rmp);
}
- mm_exit(rmp, 0); /* terminate process */
+ pm_exit(rmp, 0); /* terminate process */
}
_PROTOTYPE (int (*call_vec[NCALLS]), (void) ) = {
no_sys, /* 0 = unused */
- do_mm_exit, /* 1 = exit */
+ do_pm_exit, /* 1 = exit */
do_fork, /* 2 = fork */
no_sys, /* 3 = read */
no_sys, /* 4 = write */
*/
switch (m_in.request) {
case T_EXIT: /* exit */
- mm_exit(child, (int) m_in.data);
+ pm_exit(child, (int) m_in.data);
mp->mp_reply.reply_trace = 0;
return(OK);
case T_RESUME: