diff options
| author | Linus Torvalds <torvalds@penguin.transmeta.com> | 2003-02-10 22:58:04 -0800 |
|---|---|---|
| committer | Linus Torvalds <torvalds@home.transmeta.com> | 2003-02-10 22:58:04 -0800 |
| commit | 43fea1be12abf52dc12a61eef6059beed55c2df8 (patch) | |
| tree | 61be163e2e6f5367fc61d76f8bcabde48a2acc24 /drivers/hotplug/ibmphp_hpc.c | |
| parent | f0bec55fe38773d2022f1b585067a7a773942769 (diff) | |
Sanitize kernel daemon signal handling and process naming.
Add a name argument to daemonize() (va_arg) to avoid all the
kernel threads having to duplicate the name setting over and
over again.
Make daemonize() disable all signals by default, and add a
"allow_signal()" function to let daemons say they explicitly
want to support a signal.
Make flush_signal() take the signal lock, so that callers do
not need to.
Diffstat (limited to 'drivers/hotplug/ibmphp_hpc.c')
| -rw-r--r-- | drivers/hotplug/ibmphp_hpc.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/hotplug/ibmphp_hpc.c b/drivers/hotplug/ibmphp_hpc.c index ae959809e8a8..0bc95c57056b 100644 --- a/drivers/hotplug/ibmphp_hpc.c +++ b/drivers/hotplug/ibmphp_hpc.c @@ -1125,13 +1125,9 @@ static int process_changeinlatch (u8 old, u8 new, struct controller *ctrl) static int hpc_poll_thread (void *data) { debug ("%s - Entry\n", __FUNCTION__); - lock_kernel (); - daemonize (); - // New name - strcpy (current->comm, "hpc_poll"); - - unlock_kernel (); + daemonize("hpc_poll"); + allow_signal(SIGKILL); poll_hpc (); |
