diff options
author | Kay Sievers <kay.sievers@suse.de> | 2005-06-08 11:57:53 +0200 |
---|---|---|
committer | Kay Sievers <kay.sievers@suse.de> | 2005-06-08 11:57:53 +0200 |
commit | 561d4c5a3a66830ecfb92fdfd7ccee19cf01c2a7 (patch) | |
tree | 2f8ed430597ddff43da2ced4e075e6d42b0b36ee /udevd.c | |
parent | 9607c4222c08c2d3def2faeac62f6cca5d3ce119 (diff) |
udevd: allow starting of udevd with stopped exec-queue
Signed-off-by: Kay Sievers <kay.sievers@suse.de>
Diffstat (limited to 'udevd.c')
-rw-r--r-- | udevd.c | 16 |
1 files changed, 14 insertions, 2 deletions
@@ -766,6 +766,8 @@ int main(int argc, char *argv[], char *envp[]) fd_set readfds; const char *value; int uevent_nl_active = 0; + int daemonize = 0; + int i; logging_init("udevd"); udev_init_config(); @@ -776,8 +778,18 @@ int main(int argc, char *argv[], char *envp[]) goto exit; } - /* daemonize on request */ - if (argc == 2 && strcmp(argv[1], "-d") == 0) { + for (i = 1 ; i < argc; i++) { + char *arg = argv[i]; + if (strcmp(arg, "--daemon") == 0 || strcmp(arg, "-d") == 0) { + info("will daemonize"); + daemonize = 1; + } + if (strcmp(arg, "--stop-exec-queue") == 0) { + info("will not execute event until START_EXEC_QUEUE is received"); + stop_exec_q = 1; + } + } + if (daemonize) { pid_t pid; pid = fork(); |