projects
/
project
/
procd.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Convert log calls to ulog() api
[project/procd.git]
/
procd.c
diff --git
a/procd.c
b/procd.c
index
ad80284
..
e41d98a
100644
(file)
--- a/
procd.c
+++ b/
procd.c
@@
-15,6
+15,7
@@
#include <sys/wait.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/wait.h>
#include <sys/types.h>
#include <sys/stat.h>
+#include <sys/reboot.h>
#include <unistd.h>
#include <getopt.h>
#include <unistd.h>
#include <getopt.h>
@@
-42,6
+43,8
@@
int main(int argc, char **argv)
int ch;
char *dbglvl = getenv("DBGLVL");
int ch;
char *dbglvl = getenv("DBGLVL");
+ ulog_open(ULOG_KMSG, LOG_DAEMON, "procd");
+
if (dbglvl) {
debug = atoi(dbglvl);
unsetenv("DBGLVL");
if (dbglvl) {
debug = atoi(dbglvl);
unsetenv("DBGLVL");
@@
-61,6
+64,7
@@
int main(int argc, char **argv)
return usage(argv[0]);
}
}
return usage(argv[0]);
}
}
+ setsid();
uloop_init();
procd_signal();
trigger_init();
uloop_init();
procd_signal();
trigger_init();
@@
-69,6
+73,7
@@
int main(int argc, char **argv)
else
procd_state_next();
uloop_run();
else
procd_state_next();
uloop_run();
+ uloop_done();
return 0;
}
return 0;
}