summaryrefslogtreecommitdiff
path: root/src/helpers
diff options
context:
space:
mode:
authorJohn Estabrook <jestabro@vyos.io>2025-07-29 07:54:47 -0500
committerJohn Estabrook <jestabro@vyos.io>2025-07-29 14:12:34 -0500
commitc535f3a8eee7ea63d3d487abb9cb1e6220f345a0 (patch)
treeb0f03c18110955139b79714b18fd3db4bb2bc103 /src/helpers
parent51a17eadc063423a80502462dba0b67cb4fe3496 (diff)
downloadvyos-1x-c535f3a8eee7ea63d3d487abb9cb1e6220f345a0.tar.gz
vyos-1x-c535f3a8eee7ea63d3d487abb9cb1e6220f345a0.zip
T7651: use pid not ppid if not specified
The reset_section.py script is used in a limited case for both (1) recovery from an apply error in a config mode script and (2) recovery by a service crash in a failure handler service. In the latter case, the default pid must be os.getpid, not os.getppid, so as not to be called by pid 1.
Diffstat (limited to 'src/helpers')
-rwxr-xr-xsrc/helpers/reset_section.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/helpers/reset_section.py b/src/helpers/reset_section.py
index 7e464afd5..e57068d45 100755
--- a/src/helpers/reset_section.py
+++ b/src/helpers/reset_section.py
@@ -84,7 +84,7 @@ else:
del test
-session_id = int(pid) if pid else os.getppid()
+session_id = int(pid) if pid else os.getpid()
if in_session:
# check hint left by vyshim when ConfigError is from apply stage