Lines 271-276
Link Here
|
271 |
static struct filed consfile; /* Console */ |
271 |
static struct filed consfile; /* Console */ |
272 |
|
272 |
|
273 |
static int Debug; /* debug flag */ |
273 |
static int Debug; /* debug flag */ |
|
|
274 |
static int Foreground = 0; /* Run in foreground, instead of daemonizing */ |
274 |
static int resolve = 1; /* resolve hostname */ |
275 |
static int resolve = 1; /* resolve hostname */ |
275 |
static char LocalHostName[MAXHOSTNAMELEN]; /* our hostname */ |
276 |
static char LocalHostName[MAXHOSTNAMELEN]; /* our hostname */ |
276 |
static const char *LocalDomain; /* our local domain name */ |
277 |
static const char *LocalDomain; /* our local domain name */ |
Lines 360-366
Link Here
|
360 |
dprintf("madvise() failed: %s\n", strerror(errno)); |
361 |
dprintf("madvise() failed: %s\n", strerror(errno)); |
361 |
|
362 |
|
362 |
bindhostname = NULL; |
363 |
bindhostname = NULL; |
363 |
while ((ch = getopt(argc, argv, "468Aa:b:cCdf:kl:m:nNop:P:sS:Tuv")) |
364 |
while ((ch = getopt(argc, argv, "468Aa:b:cCdf:Fkl:m:nNop:P:sS:Tuv")) |
364 |
!= -1) |
365 |
!= -1) |
365 |
switch (ch) { |
366 |
switch (ch) { |
366 |
case '4': |
367 |
case '4': |
Lines 396-401
Link Here
|
396 |
case 'f': /* configuration file */ |
397 |
case 'f': /* configuration file */ |
397 |
ConfFile = optarg; |
398 |
ConfFile = optarg; |
398 |
break; |
399 |
break; |
|
|
400 |
case 'F': /* run in foreground instead of daemon */ |
401 |
Foreground++; |
402 |
break; |
399 |
case 'k': /* keep remote kern fac */ |
403 |
case 'k': /* keep remote kern fac */ |
400 |
KeepKernFac = 1; |
404 |
KeepKernFac = 1; |
401 |
break; |
405 |
break; |
Lines 487-500
Link Here
|
487 |
warn("cannot open pid file"); |
491 |
warn("cannot open pid file"); |
488 |
} |
492 |
} |
489 |
|
493 |
|
490 |
if (!Debug) { |
494 |
if ((!Foreground) && (!Debug)) { |
491 |
ppid = waitdaemon(0, 0, 30); |
495 |
ppid = waitdaemon(0, 0, 30); |
492 |
if (ppid < 0) { |
496 |
if (ppid < 0) { |
493 |
warn("could not become daemon"); |
497 |
warn("could not become daemon"); |
494 |
pidfile_remove(pfh); |
498 |
pidfile_remove(pfh); |
495 |
exit(1); |
499 |
exit(1); |
496 |
} |
500 |
} |
497 |
} else { |
501 |
} else if (Debug) { |
498 |
setlinebuf(stdout); |
502 |
setlinebuf(stdout); |
499 |
} |
503 |
} |
500 |
|
504 |
|