If pressed ctrl -c while pet is running, pet itself will be cancelled. #295
-
After accessing the remote terminal using the pet command, pressing Ctrl-C kills the pet itself and also kills the remote connection. Below is the result of pressing Ctrl-C when connecting ssm with aws cli
|
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
Ah now I see what your PR was about. So you were accessing a remote terminal using a pet snippet and then you expect ctrl-c to shutdown the remote process only, not Pet, and not your connection! Definitely an important need. Can you foresee any problems with having ctrl-c disabled in pet globally? I'm trying to think whether or not this should be a snippet-specific flag maybe so we don't do it globally. But not sure if running globally is a problem at all. |
Beta Was this translation helpful? Give feedback.
-
Need to make sure this doesn't apply to places where we're doing pet search or other pet-specific menus where Ctrl-C is a valid way to exit out of these pet commands. |
Beta Was this translation helpful? Give feedback.
-
The recommended way of using Pet is with the search shell functions. What this does is it copies the command to your terminal, and then you execute it just like any other command (no Pet, no subprocess, just simple shell execution). This bypasses the "Subprocess model" and launches your command as a normal terminal process, avoiding all these issues! The PR to support this with pet exec doesn't look like it's gonna get merged any time soon as there is still a tough unsolved issue. |
Beta Was this translation helpful? Give feedback.
The recommended way of using Pet is with the search shell functions. What this does is it copies the command to your terminal, and then you execute it just like any other command (no Pet, no subprocess, just simple shell execution).
This bypasses the "Subprocess model" and launches your command as a normal terminal process, avoiding all these issues!
The PR to support this with pet exec doesn't look like it's gonna get merged any time soon as there is still a tough unsolved issue.