]> git.puffer.fish Git - mirror/frr.git/commit
watchfrr: fix global restart 2918/head
authorChristian Franke <chris@opensourcerouting.org>
Sat, 25 Aug 2018 15:50:03 +0000 (17:50 +0200)
committerChristian Franke <chris@opensourcerouting.org>
Sat, 25 Aug 2018 16:17:24 +0000 (18:17 +0200)
commit7c265f7de17481148c52897251793856d9173714
tree890da10a3d83db9c724fa85cb8cfbce0c2d46a1a
parent18d93bbb5a2d6acc791726ad6de7f11d6818d32d
watchfrr: fix global restart

watchfrr needs to handle a SIGCHLD also when it calls a global restart
command. Before this patch, it would lead to the following behavior:

15:44:28: zebra state -> down : unexpected read error: Connection reset by peer
15:44:33: Forked background command [pid 6392]: /usr/sbin/frr.init watchrestart all
15:44:53: Warning: restart all child process 6392 still running after 20 seconds, sending signal 15
15:44:53: waitpid returned status for an unknown child process 6392
15:44:53: background (unknown) process 6392 terminated due to signal 15
15:45:13: Warning: restart all child process 6392 still running after 40 seconds, sending signal 9
15:45:33: Warning: restart all child process 6392 still running after 60 seconds, sending signal 9
15:45:53: Warning: restart all child process 6392 still running after 80 seconds, sending signal 9
15:46:13: Warning: restart all child process 6392 still running after 100 seconds, sending signal 9
15:46:33: Warning: restart all child process 6392 still running after 120 seconds, sending signal 9
15:46:53: Warning: restart all child process 6392 still running after 140 seconds, sending signal 9

This is obviously incorrect and can be fixed by comparing the pid to
the global restart object as well.

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
watchfrr/watchfrr.c