diff options
author | kay.sievers@vrfy.org <kay.sievers@vrfy.org> | 2004-02-11 22:29:15 -0800 |
---|---|---|
committer | Greg KH <gregkh@suse.de> | 2005-04-26 21:32:26 -0700 |
commit | f8911dbb0404902502085c7bb204f2f9c5bc1b9c (patch) | |
tree | a2b3a120e0dab1f455688c3f54ffa368dd10e508 /udev.c | |
parent | c5118442a16940fc6ba40fd94ab28061e0f0d43b (diff) |
[PATCH] compile udevd with klibc
On Mon, Feb 09, 2004 at 05:41:15AM +0100, Kay Sievers wrote:
> It seems that today was just another udev-sunday for me :)
>
> Here is a working patch to compile udevd with klibc.
>
> It's sweet the static binary takes 6 kbytes and it runs
> with only 80 kbytes virtual memory.
>
> I changed a few peaces and added a siginterrupt.c file to klibc.
> We may check with hpa to get the changes upstream?
So here is the next try :)
hpa, for good reason, didn't like my changes to klibc.
He will dump signal() completely from klibc instead, so here we switch to
sigaction() and keep udevd working with klibc.
Diffstat (limited to 'udev.c')
-rw-r--r-- | udev.c | 10 |
1 files changed, 6 insertions, 4 deletions
@@ -47,14 +47,12 @@ int log_ok(void) static void sig_handler(int signum) { - dbg("caught signal %d", signum); switch (signum) { case SIGINT: case SIGTERM: sysbus_disconnect(); udevdb_exit(); exit(20 + signum); - break; default: dbg("unhandled signal"); } @@ -100,6 +98,7 @@ static int udev_hotplug(int argc, char **argv) char *subsystem; int retval = -EINVAL; int i; + struct sigaction act; action = get_action(); if (!action) { @@ -146,8 +145,11 @@ static int udev_hotplug(int argc, char **argv) } /* set up a default signal handler for now */ - signal(SIGINT, sig_handler); - signal(SIGTERM, sig_handler); + act.sa_handler = sig_handler; + sigemptyset (&act.sa_mask); + act.sa_flags = SA_RESTART; + sigaction(SIGINT, &act, NULL); + sigaction(SIGTERM, &act, NULL); /* initialize the naming deamon */ namedev_init(); |