avoid race-condition

what if we receive a SIGHUP right after unblock_signal (or during the
whole block_signals...unblock_signals) but *before* the wait_sighup?
Yeah.
This commit is contained in:
Omar Polo 2021-02-04 18:09:30 +00:00
parent 38d4db740d
commit 9543e3fbaf
1 changed files with 1 additions and 1 deletions

2
gmid.c
View File

@ -679,8 +679,8 @@ main(int argc, char **argv)
close(p[0]);
close(p[1]);
unblock_signals();
wait_sighup();
unblock_signals();
LOGI("reloading configuration %s", config_path);
old_ipv6 = conf.ipv6;