When closing the application, check for running tasks #28123
Jazz-Man
started this conversation in
Feature Requests
Replies: 1 comment
-
|
I've had the same issue as when I have a dev server running in watch mode and accidentally close Zed, such as when the little "restart to update" button appears. The server is left hanging in the background. Sometimes this can cause the dev server to eat system resources and everything jams up. My own personal opinion is that Zed doesn't necessarily have to try to restore the system state, just warn the user that bad things might happen if they don't close the running processes before Zed. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I'm really glad that a very good editor has finally appeared, I'm really impressed and look forward to the next updates and improvements. Thank you for your work)
However, I have a few comments/suggestions.
I migrate all my work from jetbrains products to zed. I faced a problem when I run certain scripts/tasks in the project, no matter if it is a script from package.json or a task added to tasks.json.
For example, I have a node.js server and run it as “npm/yarn/pnpm/bun/etc run start”. Accordingly, the server starts on some port, say 3000. However, when I try to close the program and I don't get a message that I have any scripts or tasks running. Several times I closed the program out of habit and hoped that at least the tasks would be killed or stopped immediately. But when the project was reopened, I could not run the same script or task, because the corresponding port was busy.
Here is an example of one of the tasks.json:
Here is a screenshot from htop before running the task with privoxy filtered:
Now the task is running and everything is working:
By the way, if I re-open the project, I will also see the same two split terminals that were there before closing, but there will be no task that was there before. Now, it is at your discretion whether to restore the tasks tab or not. However, it is important that the editor checks whether tasks are running or not before closing and kills them, or at least asks the user what to do with them.
Otherwise I still have to use tmux which actually saves and restores session state.
Beta Was this translation helpful? Give feedback.
All reactions