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