Skip to content

Commit

Permalink
Using start_new_session instead of preexec_fn in subprocess.Popen(). …
Browse files Browse the repository at this point in the history
…Comment update
  • Loading branch information
Paul Nilsson committed Oct 21, 2024
1 parent 3e04dc6 commit 17f1b0a
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion PILOTVERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.9.2.1
3.9.2.2
2 changes: 1 addition & 1 deletion pilot/control/payloads/generic.py
Original file line number Diff line number Diff line change
Expand Up @@ -842,7 +842,7 @@ def run(self) -> tuple[int, str]: # noqa: C901
if stdout and stderr
else "General payload setup verification error (check setup logs)"
)
# check for special errors in thw output
# check for special errors in the output
exit_code = errors.resolve_transform_error(exit_code, diagnostics)
diagnostics = errors.format_diagnostics(exit_code, diagnostics)
return exit_code, diagnostics
Expand Down
2 changes: 1 addition & 1 deletion pilot/util/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
RELEASE = '3' # released number should be fixed at 3 for Pilot 3
VERSION = '9' # version number is '1' for first release, '0' until then, increased for bigger updates
REVISION = '2' # revision number should be reset to '0' for every new version release, increased for small updates
BUILD = '1' # build number should be reset to '1' for every new development cycle
BUILD = '2' # build number should be reset to '1' for every new development cycle

SUCCESS = 0
FAILURE = 1
Expand Down
3 changes: 2 additions & 1 deletion pilot/util/container.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,8 @@ def execute(executable: Any, **kwargs: dict) -> Any: # noqa: C901
stdout=kwargs.get('stdout', subprocess.PIPE),
stderr=kwargs.get('stderr', subprocess.PIPE),
cwd=kwargs.get('cwd', getcwd()),
preexec_fn=os.setsid, # setpgrp
start_new_session=True, # alternative to use os.setsid
# preexec_fn=os.setsid, # setpgrp
encoding='utf-8',
errors='replace')
if kwargs.get('returnproc', False):
Expand Down

0 comments on commit 17f1b0a

Please sign in to comment.