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:
Ben Gras 2005-09-08 14:31:23 +00:00
parent 9a1e860a16
commit c655d8b3ae
3 changed files with 9 additions and 2 deletions

View file

@ -16,6 +16,7 @@
/* Variables relating to shutting down MINIX. */
EXTERN char kernel_exception; /* TRUE after system exceptions */
EXTERN char shutdown_started; /* TRUE after shutdowns / reboots */
/* Kernel information structures. This groups vital kernel information. */
EXTERN phys_bytes aout; /* address of a.out headers */

View file

@ -155,6 +155,9 @@ PUBLIC void main()
}
#endif
/* We're definitely not shutting down. */
shutdown_started = 0;
/* MINIX is now ready. All boot image processes are on the ready queue.
* Return to the assembly code to start running the current process.
*/
@ -213,6 +216,9 @@ int how;
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
* scheduled by setting a watchog timer that calls shutdown(). The timer
* argument passes the shutdown status.

View file

@ -149,8 +149,8 @@ message *m_ptr; /* pointer to message in the caller's space */
return(ECALLDENIED); /* call denied by ipc mask */
}
if (isemptyn(src_dst)) {
kprintf("[sys_call: dead dest; %d, %d, %d] ",
if (isemptyn(src_dst) && !shutdown_started) {
kprintf("sys_call: dead dest; %d, %d, %d\n",
function, proc_nr(caller_ptr), src_dst);
return(EDEADDST); /* cannot send to the dead */
}