2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-30 22:15:20 +00:00

Make named a singleton process [RT#37908]

Conflicts:
	bin/tests/system/conf.sh.in
	lib/dns/win32/libdns.def.in
	lib/isc/win32/file.c

The merge also needed to update files in legacy and tcp system tests
(newly introduced in master after branch was created) to introduce use
of lockfile.
This commit is contained in:
Mukund Sivaraman
2014-12-18 11:58:50 +05:30
parent c60ee6edf1
commit 47d837a499
118 changed files with 451 additions and 38 deletions

View File

@@ -424,7 +424,7 @@ parse_command_line(int argc, char *argv[]) {
save_command_line(argc, argv);
/* PLEASE keep options synchronized when main is hooked! */
#define CMDLINE_FLAGS "46c:C:d:D:E:fFgi:lL:m:n:N:p:P:sS:t:T:U:u:vVx:"
#define CMDLINE_FLAGS "46c:C:d:D:E:fFgi:lL:m:n:N:p:P:sS:t:T:U:u:vVx:X:"
isc_commandline_errprint = ISC_FALSE;
while ((ch = isc_commandline_parse(argc, argv, CMDLINE_FLAGS)) != -1) {
switch (ch) {
@@ -613,6 +613,12 @@ parse_command_line(int argc, char *argv[]) {
LIBXML_DOTTED_VERSION);
#endif
exit(0);
case 'x':
/* Obsolete. No longer in use. Ignore. */
break;
case 'X':
ns_g_singletonfile = isc_commandline_argument;
break;
case 'F':
/* Reserved for FIPS mode */
/* FALLTHROUGH */
@@ -1215,6 +1221,11 @@ main(int argc, char *argv[]) {
parse_command_line(argc, argv);
if (!ns_os_issingleton(ns_g_singletonfile))
ns_main_earlyfatal("could not lock %s; "
"another named process may be running",
ns_g_singletonfile);
/*
* Warn about common configuration error.
*/