]> git.puffer.fish Git - mirror/frr.git/commit
lib: hard-fail creating threads before fork()
authorDavid Lamparter <equinox@opensourcerouting.org>
Thu, 22 Apr 2021 10:10:27 +0000 (12:10 +0200)
committerDavid Lamparter <equinox@opensourcerouting.org>
Thu, 22 Apr 2021 11:25:38 +0000 (13:25 +0200)
commit38554d3ae6c4ea553fd4e9ab2185c0d79f1144f7
tree6220285e2cf240c271f63464bae64054039d02f3
parent159246be247fd4332780fcafe5909874ae2c705a
lib: hard-fail creating threads before fork()

Creating any threads before we fork() into the background (if `-d` is
given) is an extremely dangerous footgun;  the threads are created in
the parent and terminated when that exits.

This is extra dangerous because while testing, you'd often run the
daemon in foreground without `-d`, and everything works as expected.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
lib/frr_pthread.c
lib/libfrr.c
lib/libfrr.h