-
Notifications
You must be signed in to change notification settings - Fork 638
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Ctrl+Z doesn't issue SIGTSTP #1364
Comments
Interesting. Besides the conventional behaviour, do you have a use case for this?
I think we're unlikely to prioritise this soon. |
@huntie A typical workflow for me is to have a shell session open for certain directories managed by a multiplexer or built-in tab management in the respective terminal emulator. By being able suspend long-running programs such as metro, I'm able to run more shell commands in the working directory of the project without exiting the metro program entirely. This is what I typically do with Webpack. |
@samholmes Understood! (TIL 😄) We should support this, but after playing around quickly, it's not a straightforward as we'd hope. Key handling is implemented by @react-native/community-cli-plugin, which calls
➡️ For now, this task will go into our backlog. Or alternatively, please feel free to take a stab at the issue, with the above constraints (might be fiddly) and open a PR. In an older version of |
I'm aware that this will send the right signal to the process: process.kill(process.pid, "SIGTSTP") Does https://www.npmjs.com/package/@react-native/community-cli-plugin handle the signaling? EDIT: I think I found the relevant file: https://github.com/facebook/react-native/blob/7b877a4bed37041a06c523eb5fe13a26dd6690df/packages/community-cli-plugin/src/commands/start/attachKeyHandlers.js#L103 Unfortunately I'm not familiar enough with the architecture of metro/react-native enough to know how to test/develop this. I'll have to take more time to setup my dev env with react-native/metro to make the contribution. |
@samholmes Yes, that's the same file I linked above :) We have a contributing guide here: https://reactnative.dev/contributing/overview But also, here's a quickstart sufficient for this issue: # 1/ Clone the repo
gh repo clone <your-account-with-fork>/react-native
code react-native/react-native.code-workspace
# 2/ (Edit files in community-cli-plugin - they will run from source)
# 3/ Run rn-tester
cd packages/rn-tester/
yarn start
# (in a second terminal window)
bundle install
bundle exec pod install
xed |
Do you want to request a feature or report a bug?
Bug
What is the current behavior?
yarn start --resetCache
ctrl+z
(common key binding in most terminals)Result: nothing happens.
What is the expected behavior?
The program is suspended as if
kill -SIGSTSTP <pid>
was run:Please provide your exact Metro configuration and mention your Metro, node, yarn/npm version and operating system.
The text was updated successfully, but these errors were encountered: