0
0
mirror of https://gitlab.nic.cz/labs/bird.git synced 2025-03-21 22:07:03 +00:00

Merge commit 'f8cc7396cf25328b002394bbd7af679188b03370' into integrated

This commit is contained in:
Ondrej Zajicek 2014-04-29 15:19:05 +02:00
commit 1a74af87ef
3 changed files with 12 additions and 6 deletions

View File

@ -151,6 +151,9 @@ options. The most important ones are:
<tag>-g <m/group/</tag> <tag>-g <m/group/</tag>
use that group ID, see the next section for details. use that group ID, see the next section for details.
<tag>-f</tag>
run bird in foreground.
</descrip> </descrip>
<p>BIRD writes messages about its work to log files or syslog (according to config). <p>BIRD writes messages about its work to log files or syslog (according to config).

View File

@ -847,12 +847,11 @@ static void
krt_scan_timer_start(struct krt_proto *p) krt_scan_timer_start(struct krt_proto *p)
{ {
if (!krt_scan_count) if (!krt_scan_count)
{
krt_scan_timer = tm_new_set(krt_pool, krt_scan, NULL, 0, KRT_CF->scan_time); krt_scan_timer = tm_new_set(krt_pool, krt_scan, NULL, 0, KRT_CF->scan_time);
tm_start(krt_scan_timer, 0);
}
krt_scan_count++; krt_scan_count++;
tm_start(krt_scan_timer, 0);
} }
static void static void

View File

@ -601,16 +601,17 @@ signal_init(void)
* Parsing of command-line arguments * Parsing of command-line arguments
*/ */
static char *opt_list = "c:dD:ps:P:u:g:"; static char *opt_list = "c:dD:ps:P:u:g:f";
static int parse_and_exit; static int parse_and_exit;
char *bird_name; char *bird_name;
static char *use_user; static char *use_user;
static char *use_group; static char *use_group;
static int run_in_foreground = 0;
static void static void
usage(void) usage(void)
{ {
fprintf(stderr, "Usage: %s [-c <config-file>] [-d] [-D <debug-file>] [-p] [-s <control-socket>] [-P <pid-file>] [-u <user>] [-g <group>]\n", bird_name); fprintf(stderr, "Usage: %s [-c <config-file>] [-d] [-D <debug-file>] [-p] [-s <control-socket>] [-P <pid-file>] [-u <user>] [-g <group>] [-f]\n", bird_name);
exit(1); exit(1);
} }
@ -718,6 +719,9 @@ parse_args(int argc, char **argv)
case 'g': case 'g':
use_group = optarg; use_group = optarg;
break; break;
case 'f':
run_in_foreground = 1;
break;
default: default:
usage(); usage();
} }
@ -777,7 +781,7 @@ main(int argc, char **argv)
if (parse_and_exit) if (parse_and_exit)
exit(0); exit(0);
if (!debug_flag) if (!(debug_flag||run_in_foreground))
{ {
pid_t pid = fork(); pid_t pid = fork();
if (pid < 0) if (pid < 0)