Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#1182: Fix freeze for OS X (wrong signals to subprocesses) #2911

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

klevvit
Copy link

@klevvit klevvit commented Oct 24, 2023

ISSUE TYPE

  • Bug fix

RUNTIME ENVIRONMENT

  • Operating system and version: macOS Ventura 13.6 (22G120)
  • Terminal emulator and version: xterm-kitty, kitty 0.30.1
  • Python version: 3.8.18 (default, Oct 24 2023, 15:49:45) [Clang 15.0.0 (clang-1500.0.40.1)]
  • Ranger version/commit: ranger-master
  • Locale: en_US.UTF-8

CHECKLIST

  • The CONTRIBUTING document has been read [REQUIRED]
  • All changes follow the code style [REQUIRED]
  • All new and existing tests pass [REQUIRED]
  • Changes require config files to be updated
    • Config files have been updated
  • Changes require documentation to be updated
    • Documentation has been updated
  • Changes require tests to be updated
    • Tests have been updated

DESCRIPTION

Replace hard-coded signal numbers with signal constants from signal lib

MOTIVATION AND CONTEXT

Different systems use different signal codes, and on macOS signals 18 and 20 mean SIGTSTP and SIGCHLD instead of SIGCONT and SIGTSTP that were intended. This caused Ranger to have frozen tasks & even crash on macOS when fast scrolling through large files.

From now on, Ranger acts normally on macOS and probably on some other operating systems.

See #1182

TESTING

All tests are passed on the lowest currently maintained Python version 3.8, but pylint<3.0.0 was required for make test to run without failures. pylint==2.17.7 seems to be fine.
Thinking on an update for HACKING.md in further PRs.

@klevvit klevvit changed the title #1182: Fix signals for OS X #1182: Fix signals to subprocesses for OS X Oct 24, 2023
klevvit added a commit to klevvit/ranger that referenced this pull request Oct 24, 2023
pylint 3.x.x brings significant changes, so current PRs may fail or even break on tests.
One of the cases that happened in ranger#2911 with pylint 3.0.1:
```
File "ranger/tests/pylint/python3.py", line 184, in Python3Checker
    __implements__ = interfaces.IAstroidChecker
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: module 'pylint.interfaces' has no attribute 'IAstroidChecker'
make: *** [test_pylint] Error 1
```
@klevvit klevvit changed the title #1182: Fix signals to subprocesses for OS X #1182: Fix freeze for OS X (wrong signals to subprocesses) May 15, 2024
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.

None yet

1 participant