xref: /minix3/minix/kernel/system/do_exit.c (revision 433d6423c39e34ec4b79c950597bb2d236f886be)
1 /* The kernel call implemented in this file:
2  *   m_type:	SYS_EXIT
3  */
4 
5 #include "kernel/system.h"
6 
7 #include <signal.h>
8 
9 #if USE_EXIT
10 
11 /*===========================================================================*
12  *				 do_exit				     *
13  *===========================================================================*/
do_exit(struct proc * caller,message * m_ptr)14 int do_exit(struct proc * caller, message * m_ptr)
15 {
16 /* Handle sys_exit. A system process has requested to exit. Generate a
17  * self-termination signal.
18  */
19   int sig_nr = SIGABRT;
20 
21   cause_sig(caller->p_nr, sig_nr);      /* send a signal to the caller */
22 
23   return(EDONTREPLY);			/* don't reply */
24 }
25 
26 #endif /* USE_EXIT */
27 
28