reset signal handlers when execve called
This commit is contained in:
@ -1688,6 +1688,7 @@ SYSCALL_DECLARE(execve)
|
||||
struct process_vm *vm = thread->vm;
|
||||
struct vm_range *range;
|
||||
struct process *proc = thread->proc;
|
||||
int i;
|
||||
|
||||
ihk_mc_spinlock_lock_noirq(&vm->memory_range_lock);
|
||||
|
||||
@ -1786,6 +1787,12 @@ SYSCALL_DECLARE(execve)
|
||||
panic("");
|
||||
}
|
||||
|
||||
for(i = 0; i < _NSIG; i++){
|
||||
if(thread->sigcommon->action[i].sa.sa_handler != SIG_IGN &&
|
||||
thread->sigcommon->action[i].sa.sa_handler != SIG_DFL)
|
||||
thread->sigcommon->action[i].sa.sa_handler = SIG_DFL;
|
||||
}
|
||||
|
||||
error = ptrace_report_exec(cpu_local_var(current));
|
||||
if(error) {
|
||||
kprintf("execve(): ERROR: ptrace_report_exec()\n");
|
||||
|
||||
Reference in New Issue
Block a user