Skip to content

Commit dd86cbb

Browse files
committed
fix(tachyon): repass permission errors on subprocesses to parent / user
These changes enable issues with permissions that happen while using the '--subprocesses' option on the 'run' method to propagate back, giving the user an indication of what went wrong. Previously, it would just silently fail, nut giving the user a hint of what happened wrong. Signed-off-by: Sofia Donato Ferreira <flowlnlnln@gmail.com>
1 parent afd10f0 commit dd86cbb

2 files changed

Lines changed: 1 addition & 1 deletion

File tree

Lib/profiling/sampling/__main__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ def handle_permission_error():
6565
main()
6666
except PermissionError:
6767
handle_permission_error()
68+
sys.exit(1)
6869
except SamplingUnknownProcessError as err:
6970
print(f"Tachyon cannot find the process: {err}", file=sys.stderr)
7071
sys.exit(1)

Lib/profiling/sampling/_child_monitor.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,6 @@ def _spawn_profiler_for_child(self, child_pid):
237237
cmd,
238238
stdin=subprocess.DEVNULL,
239239
stdout=subprocess.DEVNULL,
240-
stderr=subprocess.DEVNULL,
241240
)
242241
with self._lock:
243242
if self._stop_event.is_set():

0 commit comments

Comments
 (0)