diff options
| author | John Estabrook <jestabro@vyos.io> | 2025-07-29 07:54:47 -0500 |
|---|---|---|
| committer | John Estabrook <jestabro@vyos.io> | 2025-07-29 14:12:34 -0500 |
| commit | c535f3a8eee7ea63d3d487abb9cb1e6220f345a0 (patch) | |
| tree | b0f03c18110955139b79714b18fd3db4bb2bc103 /src/helpers/reset_section.py | |
| parent | 51a17eadc063423a80502462dba0b67cb4fe3496 (diff) | |
| download | vyos-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/reset_section.py')
| -rwxr-xr-x | src/helpers/reset_section.py | 2 |
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 |
