Al's patch of fri 19 aug 2005
This commit is contained in:
parent
4256d2d95b
commit
f4402bd129
@ -39,7 +39,6 @@ FORWARD _PROTOTYPE( void unpause, (int pro) );
|
|||||||
FORWARD _PROTOTYPE( void handle_sig, (int proc_nr, sigset_t sig_map) );
|
FORWARD _PROTOTYPE( void handle_sig, (int proc_nr, sigset_t sig_map) );
|
||||||
FORWARD _PROTOTYPE( void cause_sigalrm, (struct timer *tp) );
|
FORWARD _PROTOTYPE( void cause_sigalrm, (struct timer *tp) );
|
||||||
|
|
||||||
|
|
||||||
/*===========================================================================*
|
/*===========================================================================*
|
||||||
* do_sigaction *
|
* do_sigaction *
|
||||||
*===========================================================================*/
|
*===========================================================================*/
|
||||||
@ -166,7 +165,6 @@ PUBLIC int do_sigsuspend()
|
|||||||
return(SUSPEND);
|
return(SUSPEND);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*===========================================================================*
|
/*===========================================================================*
|
||||||
* do_sigreturn *
|
* do_sigreturn *
|
||||||
*===========================================================================*/
|
*===========================================================================*/
|
||||||
@ -226,7 +224,6 @@ PUBLIC int ksig_pending()
|
|||||||
return(SUSPEND); /* prevents sending reply */
|
return(SUSPEND); /* prevents sending reply */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*===========================================================================*
|
/*===========================================================================*
|
||||||
* handle_sig *
|
* handle_sig *
|
||||||
*===========================================================================*/
|
*===========================================================================*/
|
||||||
@ -274,7 +271,6 @@ sigset_t sig_map;
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*===========================================================================*
|
/*===========================================================================*
|
||||||
* do_alarm *
|
* do_alarm *
|
||||||
*===========================================================================*/
|
*===========================================================================*/
|
||||||
@ -284,7 +280,6 @@ PUBLIC int do_alarm()
|
|||||||
return(set_alarm(who, m_in.seconds));
|
return(set_alarm(who, m_in.seconds));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*===========================================================================*
|
/*===========================================================================*
|
||||||
* set_alarm *
|
* set_alarm *
|
||||||
*===========================================================================*/
|
*===========================================================================*/
|
||||||
@ -342,7 +337,6 @@ int sec; /* how many seconds delay before the signal */
|
|||||||
return(remaining);
|
return(remaining);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*===========================================================================*
|
/*===========================================================================*
|
||||||
* cause_sigalrm *
|
* cause_sigalrm *
|
||||||
*===========================================================================*/
|
*===========================================================================*/
|
||||||
@ -361,7 +355,6 @@ struct timer *tp;
|
|||||||
check_sig(rmp->mp_pid, SIGALRM);
|
check_sig(rmp->mp_pid, SIGALRM);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*===========================================================================*
|
/*===========================================================================*
|
||||||
* do_pause *
|
* do_pause *
|
||||||
*===========================================================================*/
|
*===========================================================================*/
|
||||||
@ -373,7 +366,6 @@ PUBLIC int do_pause()
|
|||||||
return(SUSPEND);
|
return(SUSPEND);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*===========================================================================*
|
/*===========================================================================*
|
||||||
* sig_proc *
|
* sig_proc *
|
||||||
*===========================================================================*/
|
*===========================================================================*/
|
||||||
@ -422,13 +414,14 @@ int signo; /* signal to send to process (1 to _NSIG) */
|
|||||||
sigaddset(&rmp->mp_sigpending, signo);
|
sigaddset(&rmp->mp_sigpending, signo);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
#if ENABLE_SWAP
|
||||||
if (rmp->mp_flags & ONSWAP) {
|
if (rmp->mp_flags & ONSWAP) {
|
||||||
/* Process is swapped out, leave signal pending. */
|
/* Process is swapped out, leave signal pending. */
|
||||||
sigaddset(&rmp->mp_sigpending, signo);
|
sigaddset(&rmp->mp_sigpending, signo);
|
||||||
swap_inqueue(rmp);
|
swap_inqueue(rmp);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
sigflags = rmp->mp_sigact[signo].sa_flags;
|
sigflags = rmp->mp_sigact[signo].sa_flags;
|
||||||
if (sigismember(&rmp->mp_catch, signo)) {
|
if (sigismember(&rmp->mp_catch, signo)) {
|
||||||
if (rmp->mp_flags & SIGSUSPENDED)
|
if (rmp->mp_flags & SIGSUSPENDED)
|
||||||
@ -483,12 +476,14 @@ doterminate:
|
|||||||
|
|
||||||
rmp->mp_sigstatus = (char) signo;
|
rmp->mp_sigstatus = (char) signo;
|
||||||
if (sigismember(&core_sset, signo)) {
|
if (sigismember(&core_sset, signo)) {
|
||||||
|
#if ENABLE_SWAP
|
||||||
if (rmp->mp_flags & ONSWAP) {
|
if (rmp->mp_flags & ONSWAP) {
|
||||||
/* Process is swapped out, leave signal pending. */
|
/* Process is swapped out, leave signal pending. */
|
||||||
sigaddset(&rmp->mp_sigpending, signo);
|
sigaddset(&rmp->mp_sigpending, signo);
|
||||||
swap_inqueue(rmp);
|
swap_inqueue(rmp);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
/* Switch to the user's FS environment and dump core. */
|
/* Switch to the user's FS environment and dump core. */
|
||||||
tell_fs(CHDIR, slot, FALSE, 0);
|
tell_fs(CHDIR, slot, FALSE, 0);
|
||||||
dump_core(rmp);
|
dump_core(rmp);
|
||||||
@ -496,7 +491,6 @@ doterminate:
|
|||||||
pm_exit(rmp, 0); /* terminate process */
|
pm_exit(rmp, 0); /* terminate process */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*===========================================================================*
|
/*===========================================================================*
|
||||||
* check_sig *
|
* check_sig *
|
||||||
*===========================================================================*/
|
*===========================================================================*/
|
||||||
@ -560,7 +554,6 @@ int signo; /* signal to send to process (0 to _NSIG) */
|
|||||||
return(count > 0 ? OK : error_code);
|
return(count > 0 ? OK : error_code);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*===========================================================================*
|
/*===========================================================================*
|
||||||
* check_pending *
|
* check_pending *
|
||||||
*===========================================================================*/
|
*===========================================================================*/
|
||||||
@ -590,7 +583,6 @@ register struct mproc *rmp;
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*===========================================================================*
|
/*===========================================================================*
|
||||||
* unpause *
|
* unpause *
|
||||||
*===========================================================================*/
|
*===========================================================================*/
|
||||||
@ -619,7 +611,6 @@ int pro; /* which process number */
|
|||||||
tell_fs(UNPAUSE, pro, 0, 0);
|
tell_fs(UNPAUSE, pro, 0, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*===========================================================================*
|
/*===========================================================================*
|
||||||
* dump_core *
|
* dump_core *
|
||||||
*===========================================================================*/
|
*===========================================================================*/
|
||||||
@ -680,3 +671,4 @@ register struct mproc *rmp; /* whose core is to be dumped */
|
|||||||
}
|
}
|
||||||
close(fd);
|
close(fd);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user