summaryrefslogtreecommitdiffstats
path: root/ldpd
diff options
context:
space:
mode:
authorDavid Lamparter <equinox@opensourcerouting.org>2021-04-23 15:17:07 +0200
committerDavid Lamparter <equinox@opensourcerouting.org>2021-04-23 15:17:07 +0200
commitadf8924df66f9249e1294eee365cdebf17c897d4 (patch)
tree17e9c010b3d1742393e488c622a534285f4f3958 /ldpd
parentlib: hard-fail creating threads before fork() (diff)
downloadfrr-adf8924df66f9249e1294eee365cdebf17c897d4.tar.xz
frr-adf8924df66f9249e1294eee365cdebf17c897d4.zip
ldpd: set `frr_is_after_fork` in lde/ldpe
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>
Diffstat (limited to 'ldpd')
-rw-r--r--ldpd/lde.c2
-rw-r--r--ldpd/ldpe.c2
2 files changed, 4 insertions, 0 deletions
diff --git a/ldpd/lde.c b/ldpd/lde.c
index 8fa74d1c3..02dcec750 100644
--- a/ldpd/lde.c
+++ b/ldpd/lde.c
@@ -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);
diff --git a/ldpd/ldpe.c b/ldpd/ldpe.c
index d09eb2fa3..428d2ab7b 100644
--- a/ldpd/ldpe.c
+++ b/ldpd/ldpe.c
@@ -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);