1
0
mirror of https://github.com/kakwa/uts-server synced 2024-11-12 20:48:56 +01:00

implementing -d (daemonize command line option)

This commit is contained in:
Pierre-Francois Carpentier 2015-12-17 23:30:30 +01:00
parent 74202410bf
commit 44a28dde81

View File

@ -62,13 +62,14 @@ int main(int argc, char **argv)
args.daemonize = 0;
argp_parse (&argp, argc, argv, 0, 0, &args);
skeleton_daemon();
if (args.daemonize)
skeleton_daemon();
while (1)
{
//TODO: Insert daemon code here.
syslog (LOG_NOTICE, "First daemon started.");
sleep (20);
sleep (5);
break;
}