summaryrefslogtreecommitdiff
path: root/udev.c
diff options
context:
space:
mode:
authorkay.sievers@vrfy.org <kay.sievers@vrfy.org>2004-11-06 14:28:01 +0100
committerGreg KH <gregkh@suse.de>2005-04-26 22:16:40 -0700
commit2b41e68a08548ce44b4d145900dab2bb04cd34f7 (patch)
treef2e96c9f150775e3673891d38a5af23d4246c826 /udev.c
parent482b0ecd8fcc2651c003c6f1ae9a2d3301ecf34a (diff)
[PATCH] replace tdb database by simple lockless file database
This makes the udev operation completely lockless by storing a file for every node in /dev/.udevdb/* This solved the problem with deadlocking concurrent udev processes waiting for each other to release the file lock under heavy load.
Diffstat (limited to 'udev.c')
-rw-r--r--udev.c11
1 files changed, 1 insertions, 10 deletions
diff --git a/udev.c b/udev.c
index 7809060520..d8cb4365fd 100644
--- a/udev.c
+++ b/udev.c
@@ -38,8 +38,6 @@
#include "namedev.h"
#include "udevdb.h"
-/* timeout flag for udevdb */
-extern sig_atomic_t gotalarm;
/* global variables */
char **main_argv;
@@ -64,8 +62,7 @@ static void asmlinkage sig_handler(int signum)
{
switch (signum) {
case SIGALRM:
- gotalarm = 1;
- break;
+ exit(1);
case SIGINT:
case SIGTERM:
exit(20 + signum);
@@ -153,10 +150,6 @@ int main(int argc, char *argv[], char *envp[])
/* trigger timout to interrupt blocking syscalls */
alarm(ALARM_TIMEOUT);
- /* initialize udev database */
- if (udevdb_init(UDEVDB_DEFAULT) != 0)
- info("error: unable to initialize database, continuing without database");
-
switch(act_type) {
case UDEVSTART:
dbg("udevstart");
@@ -196,8 +189,6 @@ int main(int argc, char *argv[], char *envp[])
dev_d_execute(&udev);
}
- udevdb_exit();
-
exit:
logging_close();
return retval;