X-Git-Url: http://git.archive.openwrt.org/?p=project%2Fprocd.git;a=blobdiff_plain;f=procd.c;h=8dcd924ebabbc1cba4996401b43e988743ac03f8;hp=6fb0a72c687e4f1eee7ba748555502625740ba17;hb=3ff99010e61a0299257ffc91467a16d278a7e774;hpb=d49096fea2499f118976fc6ad17e803847629eab;ds=inline diff --git a/procd.c b/procd.c index 6fb0a72..8dcd924 100644 --- a/procd.c +++ b/procd.c @@ -15,6 +15,7 @@ #include #include #include +#include #include #include @@ -40,6 +41,12 @@ static int usage(const char *prog) int main(int argc, char **argv) { int ch; + char *dbglvl = getenv("DBGLVL"); + + if (dbglvl) { + debug = atoi(dbglvl); + unsetenv("DBGLVL"); + } while ((ch = getopt(argc, argv, "d:s:h:")) != -1) { switch (ch) { @@ -63,6 +70,7 @@ int main(int argc, char **argv) else procd_state_next(); uloop_run(); + uloop_done(); return 0; }