Commit d6559d18 authored by Leigh B. Stoller's avatar Leigh B. Stoller

Add proper daemonization and log file handling.

parent 9d416c02
......@@ -122,8 +122,15 @@ int main(int argc, char **argv)
if (debug)
loginit(0, log_file);
else
loginit(1, "agent-thing");
else {
/* Become a daemon */
daemon(0, 0);
if (log_file)
loginit(0, log_file);
else
loginit(1, "agent-thing");
}
/* open the map file*/
if(NULL == (mp = fopen(map_file,"r")))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment