aboutsummaryrefslogtreecommitdiffstats
path: root/fs/exec.c
diff options
context:
space:
mode:
authorDavide Libenzi <davidel@xmailserver.org>2007-09-20 15:40:16 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-09-20 16:19:59 -0400
commitb8fceee17a310f189188599a8fa5e9beaff57eb0 (patch)
tree21308319be2579059a4d4d7db680a73334659f82 /fs/exec.c
parent9db619e66503494e41159de3c76fafabe80d016b (diff)
signalfd simplification
This simplifies signalfd code, by avoiding it to remain attached to the sighand during its lifetime. In this way, the signalfd remain attached to the sighand only during poll(2) (and select and epoll) and read(2). This also allows to remove all the custom "tsk == current" checks in kernel/signal.c, since dequeue_signal() will only be called by "current". I think this is also what Ben was suggesting time ago. The external effect of this, is that a thread can extract only its own private signals and the group ones. I think this is an acceptable behaviour, in that those are the signals the thread would be able to fetch w/out signalfd. Signed-off-by: Davide Libenzi <davidel@xmailserver.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/exec.c')
-rw-r--r--fs/exec.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/fs/exec.c b/fs/exec.c
index c21a8cc06277..073b0b8c6d05 100644
--- a/fs/exec.c
+++ b/fs/exec.c
@@ -50,7 +50,6 @@
50#include <linux/tsacct_kern.h> 50#include <linux/tsacct_kern.h>
51#include <linux/cn_proc.h> 51#include <linux/cn_proc.h>
52#include <linux/audit.h> 52#include <linux/audit.h>
53#include <linux/signalfd.h>
54 53
55#include <asm/uaccess.h> 54#include <asm/uaccess.h>
56#include <asm/mmu_context.h> 55#include <asm/mmu_context.h>
@@ -784,7 +783,6 @@ static int de_thread(struct task_struct *tsk)
784 * and we can just re-use it all. 783 * and we can just re-use it all.
785 */ 784 */
786 if (atomic_read(&oldsighand->count) <= 1) { 785 if (atomic_read(&oldsighand->count) <= 1) {
787 signalfd_detach(tsk);
788 exit_itimers(sig); 786 exit_itimers(sig);
789 return 0; 787 return 0;
790 } 788 }
@@ -923,7 +921,6 @@ static int de_thread(struct task_struct *tsk)
923 sig->flags = 0; 921 sig->flags = 0;
924 922
925no_thread_group: 923no_thread_group:
926 signalfd_detach(tsk);
927 exit_itimers(sig); 924 exit_itimers(sig);
928 if (leader) 925 if (leader)
929 release_task(leader); 926 release_task(leader);