repair signal implementation.
- Don't intrrupt syscall with the ignored signal.
This commit is contained in:
@@ -561,10 +561,10 @@ do_kill(int pid, int tid, int sig, siginfo_t *info)
|
|||||||
struct process *tproc = NULL;
|
struct process *tproc = NULL;
|
||||||
int i;
|
int i;
|
||||||
__sigset_t mask;
|
__sigset_t mask;
|
||||||
struct sig_pending *pending;
|
|
||||||
struct list_head *head;
|
struct list_head *head;
|
||||||
int rc;
|
int rc;
|
||||||
unsigned long irqstate = 0;
|
unsigned long irqstate = 0;
|
||||||
|
struct k_sigaction *k;
|
||||||
int doint;
|
int doint;
|
||||||
ihk_spinlock_t *savelock = NULL;
|
ihk_spinlock_t *savelock = NULL;
|
||||||
int found = 0;
|
int found = 0;
|
||||||
@@ -728,8 +728,12 @@ do_kill(int pid, int tid, int sig, siginfo_t *info)
|
|||||||
/* Put signal event even when handler is SIG_IGN or SIG_DFL
|
/* Put signal event even when handler is SIG_IGN or SIG_DFL
|
||||||
because target ptraced process must call ptrace_report_signal
|
because target ptraced process must call ptrace_report_signal
|
||||||
in check_signal */
|
in check_signal */
|
||||||
pending = NULL;
|
|
||||||
rc = 0;
|
rc = 0;
|
||||||
|
k = tproc->sighandler->action + sig - 1;
|
||||||
|
if(k->sa.sa_handler != (void *)1 &&
|
||||||
|
(k->sa.sa_handler != NULL ||
|
||||||
|
(sig != SIGCHLD && sig != SIGURG))){
|
||||||
|
struct sig_pending *pending = NULL;
|
||||||
if (sig < 33) { // SIGRTMIN - SIGRTMAX
|
if (sig < 33) { // SIGRTMIN - SIGRTMAX
|
||||||
list_for_each_entry(pending, head, list){
|
list_for_each_entry(pending, head, list){
|
||||||
if(pending->sigmask.__val[0] == mask)
|
if(pending->sigmask.__val[0] == mask)
|
||||||
@@ -754,6 +758,7 @@ do_kill(int pid, int tid, int sig, siginfo_t *info)
|
|||||||
tproc->sigevent = 1;
|
tproc->sigevent = 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if(tid == -1){
|
if(tid == -1){
|
||||||
ihk_mc_spinlock_unlock_noirq(&tproc->sigshared->lock);
|
ihk_mc_spinlock_unlock_noirq(&tproc->sigshared->lock);
|
||||||
|
|||||||
Reference in New Issue
Block a user