mirror of
https://github.com/AuxXxilium/eudev.git
synced 2024-11-24 07:20:56 +07:00
[PATCH] fix udevd zombies
The recent version of klibc switched to -mregparm=3. This broke the signal handlers parameter, cause it is called directly from the kernel with the parameter on the stack not in a register.
This commit is contained in:
parent
0f36e68e8a
commit
47bf9196c6
6
udev.c
6
udev.c
@ -55,7 +55,7 @@ void log_message(int level, const char *format, ...)
|
||||
}
|
||||
#endif
|
||||
|
||||
static void sig_handler(int signum)
|
||||
__attribute__((regparm(0))) static void sig_handler(int signum)
|
||||
{
|
||||
switch (signum) {
|
||||
case SIGINT:
|
||||
@ -63,7 +63,7 @@ static void sig_handler(int signum)
|
||||
udevdb_exit();
|
||||
exit(20 + signum);
|
||||
default:
|
||||
dbg("unhandled signal");
|
||||
dbg("unhandled signal %d", signum);
|
||||
}
|
||||
}
|
||||
|
||||
@ -128,7 +128,7 @@ static int udev_hotplug(void)
|
||||
goto exit;
|
||||
}
|
||||
|
||||
/* set up a default signal handler for now */
|
||||
/* set signal handlers */
|
||||
act.sa_handler = sig_handler;
|
||||
sigemptyset (&act.sa_mask);
|
||||
act.sa_flags = SA_RESTART;
|
||||
|
5
udevd.c
5
udevd.c
@ -306,9 +306,10 @@ skip:
|
||||
return;
|
||||
}
|
||||
|
||||
static void sig_handler(int signum)
|
||||
__attribute__((regparm(0))) static void sig_handler(int signum)
|
||||
{
|
||||
int rc;
|
||||
|
||||
switch (signum) {
|
||||
case SIGINT:
|
||||
case SIGTERM:
|
||||
@ -325,7 +326,7 @@ static void sig_handler(int signum)
|
||||
goto do_write;
|
||||
break;
|
||||
default:
|
||||
dbg("unhandled signal");
|
||||
dbg("unhandled signal %d", signum);
|
||||
return;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user