mirror of
https://github.com/kakwa/uts-server
synced 2025-01-07 12:14:31 +01:00
implementing -d (daemonize command line option)
This commit is contained in:
parent
74202410bf
commit
44a28dde81
@ -62,13 +62,14 @@ int main(int argc, char **argv)
|
|||||||
args.daemonize = 0;
|
args.daemonize = 0;
|
||||||
argp_parse (&argp, argc, argv, 0, 0, &args);
|
argp_parse (&argp, argc, argv, 0, 0, &args);
|
||||||
|
|
||||||
skeleton_daemon();
|
if (args.daemonize)
|
||||||
|
skeleton_daemon();
|
||||||
|
|
||||||
while (1)
|
while (1)
|
||||||
{
|
{
|
||||||
//TODO: Insert daemon code here.
|
//TODO: Insert daemon code here.
|
||||||
syslog (LOG_NOTICE, "First daemon started.");
|
syslog (LOG_NOTICE, "First daemon started.");
|
||||||
sleep (20);
|
sleep (5);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user