Skip to content

Commit

Permalink
ldpd: set frr_is_after_fork in lde/ldpe
Browse files Browse the repository at this point in the history
These subprocesses don't use frr_config_fork(), so frr_is_after_fork is
never set.  While the frr_pthread stuff isn't currently used there, set
the flag anyway to avoid future headaches.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
  • Loading branch information
eqvinox committed Apr 23, 2021
1 parent 38554d3 commit adf8924
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions ldpd/lde.c
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,8 @@ lde(void)
log_procname = log_procnames[PROC_LDE_ENGINE];

master = frr_init();
/* no frr_config_fork() here, allow frr_pthread to create threads */
frr_is_after_fork = true;

/* setup signal handler */
signal_init(master, array_size(lde_signals), lde_signals);
Expand Down
2 changes: 2 additions & 0 deletions ldpd/ldpe.c
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,8 @@ ldpe(void)
log_procname = log_procnames[ldpd_process];

master = frr_init();
/* no frr_config_fork() here, allow frr_pthread to create threads */
frr_is_after_fork = true;

/* setup signal handler */
signal_init(master, array_size(ldpe_signals), ldpe_signals);
Expand Down

0 comments on commit adf8924

Please sign in to comment.