diff options
Diffstat (limited to 'fs/exec.c')
-rw-r--r-- | fs/exec.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -1561,12 +1561,13 @@ out: | |||
1561 | return ispipe; | 1561 | return ispipe; |
1562 | } | 1562 | } |
1563 | 1563 | ||
1564 | static int zap_process(struct task_struct *start) | 1564 | static int zap_process(struct task_struct *start, int exit_code) |
1565 | { | 1565 | { |
1566 | struct task_struct *t; | 1566 | struct task_struct *t; |
1567 | int nr = 0; | 1567 | int nr = 0; |
1568 | 1568 | ||
1569 | start->signal->flags = SIGNAL_GROUP_EXIT; | 1569 | start->signal->flags = SIGNAL_GROUP_EXIT; |
1570 | start->signal->group_exit_code = exit_code; | ||
1570 | start->signal->group_stop_count = 0; | 1571 | start->signal->group_stop_count = 0; |
1571 | 1572 | ||
1572 | t = start; | 1573 | t = start; |
@@ -1591,8 +1592,7 @@ static inline int zap_threads(struct task_struct *tsk, struct mm_struct *mm, | |||
1591 | spin_lock_irq(&tsk->sighand->siglock); | 1592 | spin_lock_irq(&tsk->sighand->siglock); |
1592 | if (!signal_group_exit(tsk->signal)) { | 1593 | if (!signal_group_exit(tsk->signal)) { |
1593 | mm->core_state = core_state; | 1594 | mm->core_state = core_state; |
1594 | tsk->signal->group_exit_code = exit_code; | 1595 | nr = zap_process(tsk, exit_code); |
1595 | nr = zap_process(tsk); | ||
1596 | } | 1596 | } |
1597 | spin_unlock_irq(&tsk->sighand->siglock); | 1597 | spin_unlock_irq(&tsk->sighand->siglock); |
1598 | if (unlikely(nr < 0)) | 1598 | if (unlikely(nr < 0)) |
@@ -1641,7 +1641,7 @@ static inline int zap_threads(struct task_struct *tsk, struct mm_struct *mm, | |||
1641 | if (p->mm) { | 1641 | if (p->mm) { |
1642 | if (unlikely(p->mm == mm)) { | 1642 | if (unlikely(p->mm == mm)) { |
1643 | lock_task_sighand(p, &flags); | 1643 | lock_task_sighand(p, &flags); |
1644 | nr += zap_process(p); | 1644 | nr += zap_process(p, exit_code); |
1645 | unlock_task_sighand(p, &flags); | 1645 | unlock_task_sighand(p, &flags); |
1646 | } | 1646 | } |
1647 | break; | 1647 | break; |