Added shutdown_started global variable. If it's set, we're in the
process of doing a shutdown. Initial purpose is - suppress dead process diagnostic message.
This commit is contained in:
parent
9a1e860a16
commit
c655d8b3ae
|
@ -16,6 +16,7 @@
|
||||||
|
|
||||||
/* Variables relating to shutting down MINIX. */
|
/* Variables relating to shutting down MINIX. */
|
||||||
EXTERN char kernel_exception; /* TRUE after system exceptions */
|
EXTERN char kernel_exception; /* TRUE after system exceptions */
|
||||||
|
EXTERN char shutdown_started; /* TRUE after shutdowns / reboots */
|
||||||
|
|
||||||
/* Kernel information structures. This groups vital kernel information. */
|
/* Kernel information structures. This groups vital kernel information. */
|
||||||
EXTERN phys_bytes aout; /* address of a.out headers */
|
EXTERN phys_bytes aout; /* address of a.out headers */
|
||||||
|
|
|
@ -155,6 +155,9 @@ PUBLIC void main()
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/* We're definitely not shutting down. */
|
||||||
|
shutdown_started = 0;
|
||||||
|
|
||||||
/* MINIX is now ready. All boot image processes are on the ready queue.
|
/* MINIX is now ready. All boot image processes are on the ready queue.
|
||||||
* Return to the assembly code to start running the current process.
|
* Return to the assembly code to start running the current process.
|
||||||
*/
|
*/
|
||||||
|
@ -213,6 +216,9 @@ int how;
|
||||||
send_sig(proc_nr(rp), SIGKSTOP);
|
send_sig(proc_nr(rp), SIGKSTOP);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* We're shutting down. Diagnostics may behave differently now. */
|
||||||
|
shutdown_started = 1;
|
||||||
|
|
||||||
/* Notify system processes of the upcoming shutdown and allow them to be
|
/* Notify system processes of the upcoming shutdown and allow them to be
|
||||||
* scheduled by setting a watchog timer that calls shutdown(). The timer
|
* scheduled by setting a watchog timer that calls shutdown(). The timer
|
||||||
* argument passes the shutdown status.
|
* argument passes the shutdown status.
|
||||||
|
|
|
@ -149,8 +149,8 @@ message *m_ptr; /* pointer to message in the caller's space */
|
||||||
return(ECALLDENIED); /* call denied by ipc mask */
|
return(ECALLDENIED); /* call denied by ipc mask */
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isemptyn(src_dst)) {
|
if (isemptyn(src_dst) && !shutdown_started) {
|
||||||
kprintf("[sys_call: dead dest; %d, %d, %d] ",
|
kprintf("sys_call: dead dest; %d, %d, %d\n",
|
||||||
function, proc_nr(caller_ptr), src_dst);
|
function, proc_nr(caller_ptr), src_dst);
|
||||||
return(EDEADDST); /* cannot send to the dead */
|
return(EDEADDST); /* cannot send to the dead */
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue