summaryrefslogtreecommitdiff
path: root/kernel/workqueue.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@home.osdl.org>2004-01-19 05:36:00 -0800
committerLinus Torvalds <torvalds@home.osdl.org>2004-01-19 05:36:00 -0800
commitdfb754ee9854da301b6de62f02c4a494e3404e45 (patch)
tree01c40ca577973665d9936158f499d7c64de91c82 /kernel/workqueue.c
parent5a8d6ecf62b3ef2a0cde434e9bfdd33b76c07496 (diff)
parentd52531b8e75f705d889060fdeb15898d655cd9b3 (diff)
Merge bk://kernel.bkbits.net/gregkh/linux/driver-2.6
into home.osdl.org:/home/torvalds/v2.5/linux
Diffstat (limited to 'kernel/workqueue.c')
-rw-r--r--kernel/workqueue.c14
1 files changed, 1 insertions, 13 deletions
diff --git a/kernel/workqueue.c b/kernel/workqueue.c
index 4b109a7d390b..fed20b9813e5 100644
--- a/kernel/workqueue.c
+++ b/kernel/workqueue.c
@@ -14,13 +14,10 @@
* Theodore Ts'o <tytso@mit.edu>
*/
-#define __KERNEL_SYSCALLS__
-
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/sched.h>
#include <linux/init.h>
-#include <linux/unistd.h>
#include <linux/signal.h>
#include <linux/completion.h>
#include <linux/workqueue.h>
@@ -171,7 +168,6 @@ static int worker_thread(void *__startup)
struct k_sigaction sa;
daemonize("%s/%d", startup->name, cpu);
- allow_signal(SIGCHLD);
current->flags |= PF_IOTHREAD;
cwq->thread = current;
@@ -180,7 +176,7 @@ static int worker_thread(void *__startup)
complete(&startup->done);
- /* Install a handler so SIGCLD is delivered */
+ /* SIG_IGN makes children autoreap: see do_notify_parent(). */
sa.sa.sa_handler = SIG_IGN;
sa.sa.sa_flags = 0;
siginitset(&sa.sa.sa_mask, sigmask(SIGCHLD));
@@ -200,14 +196,6 @@ static int worker_thread(void *__startup)
if (!list_empty(&cwq->worklist))
run_workqueue(cwq);
-
- if (signal_pending(current)) {
- while (waitpid(-1, NULL, __WALL|WNOHANG) > 0)
- /* SIGCHLD - auto-reaping */ ;
-
- /* zap all other signals */
- flush_signals(current);
- }
}
remove_wait_queue(&cwq->more_work, &wait);
complete(&cwq->exit);