[PATCH] firewall3: fix process termination in child processes
Stacy Corcoran
stacy.corcoran at verkada.com
Tue Dec 23 10:45:39 PST 2025
Hello,
I have submitted a pull request for firewall3 to fix a bug where child
processes fail to terminate if an exec operation fails.
Problem: When execv() or execl() fail in child processes, the child
currently continues executing parent code instead of properly
terminating. This can lead to unexpected behavior and ghost firewall3
processes.
Solution: Added proper error handling and _exit(EXIT_FAILURE) calls
after failed exec operations in __fw3_command_pipe() and fw3_hotplug()
to ensure child processes terminate immediately.
We have been using this patched version in our production embedded
solutions for over two months and have found it to be stable.
The PR can be found here: https://github.com/openwrt/firewall3/pull/7
________________________________
firewall3: fix process termination in child processes
When execv() or execl() fail in child processes, the child would
continue executing parent code instead of properly terminating. This
could lead to unexpected behavior with multiple firewall3 processes
running.
Add proper error handling and _exit(EXIT_FAILURE) calls after failed
exec operations in __fw3_command_pipe() and fw3_hotplug() to ensure
child processes terminate immediately on exec failure.
Signed-off-by: Stacy Corcoran stacy.corcoran at verkada.com
More information about the openwrt-devel
mailing list