projects
/
project
/
procd.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
add debug level handover between preinit and main process
[project/procd.git]
/
initd
/
preinit.c
diff --git
a/initd/preinit.c
b/initd/preinit.c
index
eeadbeb
..
c5f7ada
100644
(file)
--- a/
initd/preinit.c
+++ b/
initd/preinit.c
@@
-34,7
+34,7
@@
static void
spawn_procd(struct uloop_process *proc, int ret)
{
char *wdt_fd = watchdog_fd();
spawn_procd(struct uloop_process *proc, int ret)
{
char *wdt_fd = watchdog_fd();
- char *argv[] = { "/sbin/procd", NULL };
+ char *argv[] = { "/sbin/procd",
"-d", "0",
NULL };
struct stat s;
if (plugd_proc.pid > 0)
struct stat s;
if (plugd_proc.pid > 0)
@@
-49,6
+49,10
@@
spawn_procd(struct uloop_process *proc, int ret)
DEBUG(2, "Exec to real procd now\n");
if (wdt_fd)
setenv("WDTFD", wdt_fd, 1);
DEBUG(2, "Exec to real procd now\n");
if (wdt_fd)
setenv("WDTFD", wdt_fd, 1);
+ if (debug)
+ snprintf(argv[2], 2, "%d", debug & 0xf);
+ else
+ argv[1] = NULL;
execvp(argv[0], argv);
}
execvp(argv[0], argv);
}