Skip to content

Conversation

joshuadavidthomas
Copy link
Owner

closes #142

Okay, this at least fixes the issue with the process not being killed when the editor quits and stdin/stdout is closed. But there's some issues with I assume the unique way we have the Python entrypoint and PyO3 not handing off ... something? The result handling at the end of the cli run method doesn't actually get hit, so you have to process exit in the serve method. Who knows????

This also moves the tokio business just into the serve command, as well as creates some boilerplate for exiting. Could have used an external crate for this -- there are a few -- but it seemed simple enough so I just brought it in.

Still can't handle Ctrl-C quitting the serve command when just running in the terminal, but you can hit enter to force a parse error and crash the thing. I may revisit that later, but since this isn't designed to be run in the terminal maybe a simple log about that not being supported and a note about hitting enter to exit will do fine.

@joshuadavidthomas joshuadavidthomas merged commit 26cd151 into main May 13, 2025
22 checks passed
@joshuadavidthomas joshuadavidthomas deleted the fix-process-exit branch May 13, 2025 20:52
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.

Serve command doesn't exit cleanly
1 participant