1
0
mirror of https://github.com/kakwa/uts-server synced 2024-07-02 00:19:06 +02:00

implementing -d (daemonize command line option)

This commit is contained in:
pcarpent 2015-12-17 23:30:30 +01:00
parent bcb13836c2
commit 19aade9650

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;
}