Commit 79e42c5
committed
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@verkada.com>1 parent 3a65fde commit 79e42c5
1 file changed
Lines changed: 8 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
271 | 271 | | |
272 | 272 | | |
273 | 273 | | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
274 | 278 | | |
275 | 279 | | |
276 | 280 | | |
| |||
771 | 775 | | |
772 | 776 | | |
773 | 777 | | |
774 | | - | |
| 778 | + | |
775 | 779 | | |
776 | 780 | | |
777 | 781 | | |
| |||
783 | 787 | | |
784 | 788 | | |
785 | 789 | | |
786 | | - | |
787 | 790 | | |
788 | 791 | | |
789 | 792 | | |
| |||
794 | 797 | | |
795 | 798 | | |
796 | 799 | | |
797 | | - | |
798 | | - | |
| 800 | + | |
| 801 | + | |
| 802 | + | |
799 | 803 | | |
800 | 804 | | |
801 | 805 | | |
| |||
0 commit comments