Skip to content

fix: prevent infinite fork loop in pip package CLI wrapper#14

Merged
dipankar merged 1 commit into
mainfrom
fix/clean-fork-loop
May 8, 2026
Merged

fix: prevent infinite fork loop in pip package CLI wrapper#14
dipankar merged 1 commit into
mainfrom
fix/clean-fork-loop

Conversation

@dipankar

@dipankar dipankar commented May 8, 2026

Copy link
Copy Markdown
Contributor

Summary

Test plan

  • Install pip package in a venv: pip install -e packages/pypi/
  • Run rpytest --version — should return version without spawning zombie processes
  • Verify ps aux | grep rpytest shows only one process

Replaced `which rpytest` with manual PATH iteration that skips:
- The wrapper script itself (resolves to same file)
- Python shebang executables (#! ... python)

This prevents the pip package entry point from finding itself and
spawning an infinite subprocess recursion.

Fixes #2
@dipankar dipankar merged commit bff6b6c into main May 8, 2026
2 of 10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Python pip package CLI wrapper causes infinite fork loop

1 participant