Move kernel signal SIGKNDELAY to system signal SIGSNDELAY and fix broken ptrace.
This commit is contained in:
parent
4d686f1616
commit
d8b42a755d
|
@ -67,15 +67,22 @@ typedef unsigned long sigset_t;
|
|||
* The order here determines the order signals are processed by system
|
||||
* processes in user-space. Higher-priority signals should be first.
|
||||
*/
|
||||
#define SIGKPF 26 /* kernel page fault request pending */
|
||||
#define SIGKMEM 27 /* kernel memory request pending */
|
||||
#define SIGKMESS 28 /* new kernel message */
|
||||
#define SIGKSIGSM 29 /* kernel signal pending for signal manager */
|
||||
#define SIGKSIG 30 /* kernel signal pending */
|
||||
#define SIGKNDELAY 31 /* end of delay for signal delivery */
|
||||
/* Signals delivered by a signal manager. */
|
||||
#define SIGSNDELAY 26 /* end of delay for signal delivery */
|
||||
|
||||
#define SIGS_FIRST SIGHUP /* first system signal */
|
||||
#define SIGS_LAST SIGSNDELAY /* last system signal */
|
||||
#define IS_SIGS(signo) (signo>=SIGS_FIRST && signo<=SIGS_LAST)
|
||||
|
||||
/* Signals delivered by the kernel. */
|
||||
#define SIGKPF 27 /* kernel page fault request pending */
|
||||
#define SIGKMEM 28 /* kernel memory request pending */
|
||||
#define SIGKMESS 29 /* new kernel message */
|
||||
#define SIGKSIGSM 30 /* kernel signal pending for signal manager */
|
||||
#define SIGKSIG 31 /* kernel signal pending */
|
||||
|
||||
#define SIGK_FIRST SIGKPF /* first kernel signal */
|
||||
#define SIGK_LAST SIGKNDELAY /* last kernel signal */
|
||||
#define SIGK_LAST SIGKSIG /* last kernel signal */
|
||||
#define IS_SIGK(signo) (signo>=SIGK_FIRST && signo<=SIGK_LAST)
|
||||
|
||||
/* Termination signals for Minix system processes. */
|
||||
|
|
|
@ -401,7 +401,7 @@ PUBLIC void sig_delay_done(struct proc *rp)
|
|||
|
||||
rp->p_misc_flags &= ~MF_SIG_DELAY;
|
||||
|
||||
cause_sig(proc_nr(rp), SIGKNDELAY);
|
||||
cause_sig(proc_nr(rp), SIGSNDELAY);
|
||||
}
|
||||
|
||||
#if _MINIX_CHIP == _CHIP_INTEL
|
||||
|
|
|
@ -19,7 +19,7 @@ PUBLIC int do_runctl(struct proc * caller, message * m_ptr)
|
|||
/* Control a process's RTS_PROC_STOP flag. Used for process management.
|
||||
* If the process is queued sending a message or stopped for system call
|
||||
* tracing, and the RC_DELAY request flag is given, set MF_SIG_DELAY instead
|
||||
* of RTS_PROC_STOP, and send a SIGKNDELAY signal later when the process is done
|
||||
* of RTS_PROC_STOP, and send a SIGSNDELAY signal later when the process is done
|
||||
* sending (ending the delay). Used by PM for safe signal delivery.
|
||||
*/
|
||||
int proc_nr, action, flags, delayed;
|
||||
|
|
|
@ -42,7 +42,7 @@ PRIVATE void process_sigmgr_signals(void)
|
|||
} else {
|
||||
/* Process every signal in the signal set. */
|
||||
r = OK;
|
||||
for(signo = 1; signo < _NSIG; signo++) {
|
||||
for (signo = SIGS_FIRST; signo <= SIGS_LAST; signo++) {
|
||||
if(sigismember(&sigset, signo)) {
|
||||
/* Let the callback code process the signal. */
|
||||
r = sef_cbs.sef_cb_signal_manager(target, signo);
|
||||
|
@ -70,7 +70,7 @@ PRIVATE void process_sigmgr_self_signals(sigset_t sigset)
|
|||
/* A signal manager has pending signals for itself. Process them. */
|
||||
int signo;
|
||||
|
||||
for(signo = 1; signo < _NSIG; signo++) {
|
||||
for (signo = SIGS_FIRST; signo <= SIGS_LAST; signo++) {
|
||||
if(sigismember(&sigset, signo)) {
|
||||
/* Let the callback code process the signal. */
|
||||
sef_cbs.sef_cb_signal_handler(signo);
|
||||
|
|
|
@ -256,14 +256,14 @@ int signo;
|
|||
}
|
||||
check_sig(id, signo, TRUE /* ksig */);
|
||||
|
||||
/* If SIGKNDELAY is set, an earlier sys_stop() failed because the process was
|
||||
/* If SIGSNDELAY is set, an earlier sys_stop() failed because the process was
|
||||
* still sending, and the kernel hereby tells us that the process is now done
|
||||
* with that. We can now try to resume what we planned to do in the first
|
||||
* place: set up a signal handler. However, the process's message may have
|
||||
* been a call to PM, in which case the process may have changed any of its
|
||||
* signal settings. The process may also have forked, exited etcetera.
|
||||
*/
|
||||
if (signo == SIGKNDELAY && (rmp->mp_flags & DELAY_CALL)) {
|
||||
if (signo == SIGSNDELAY && (rmp->mp_flags & DELAY_CALL)) {
|
||||
rmp->mp_flags &= ~DELAY_CALL;
|
||||
|
||||
if (rmp->mp_flags & (FS_CALL | PM_SIG_PENDING))
|
||||
|
@ -639,7 +639,7 @@ struct mproc *rmp; /* which process */
|
|||
r = sys_delay_stop(rmp->mp_endpoint);
|
||||
|
||||
/* If the process is still busy sending a message, the kernel will give
|
||||
* us EBUSY now and send a SIGKNDELAY to the process as soon as sending
|
||||
* us EBUSY now and send a SIGSNDELAY to the process as soon as sending
|
||||
* is done.
|
||||
*/
|
||||
if (r == EBUSY) {
|
||||
|
|
Loading…
Reference in a new issue