-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
detached child processes are killed when nodemon resets #1398
Comments
This issue has been automatically marked as idle and stale because it hasn't had any recent activity. It will be automtically closed if no further activity occurs. If you think this is wrong, or the problem still persists, just pop a reply in the comments and @remy will (try!) to follow up. |
I don't believe this is stale since it hasn't been interacted by the owner or any maintainers in the timeframe. |
@alallier I'm all the maintainers and owner. I don't have a solution, and so it's stale as no one has come forth. Can @Autre31415 provide parred down code to replicate? I'm not sure this is fixable (again, since no one has offered any solution), as nodemon is doing exactly what it's supposed to do (end all the subprocesses). |
This issue has been automatically marked as idle and stale because it hasn't had any recent activity. It will be automtically closed if no further activity occurs. If you think this is wrong, or the problem still persists, just pop a reply in the comments and @remy will (try!) to follow up. |
I'm also dealing with this issue. I'm spawning worker processes as detached children that are not part of the codebase I'm using nodemon with, so when the parent process exists, ideally, I'd like for those processes to keep running, even during development. For example: const worker = spawn('some_command', args, {
stdio: 'ignore',
detached: true,
});
worker.unref() Using Lines 323 to 343 in 7e00a30
I can't think of an elegant way to exclude processes that are explicitly detached, but maybe we can add a Could you please consider reevaluating this issue? |
Nodemon is a development tool for shutting down and restarting. If a process is being "detected", then the dev cycle is to shut it down - not ignore it. If you need to use nodemon with your codebase in this fashion, the best approach is to spawn the subprocess outside of what's being monitored by nodemon. |
nodemon -v
: 8.11.3node -v
: 1.18.3nodemon -v app.js --development-mode
Expected behaviour
Detached child processes should survive a nodemon reset, just as they would survive a CTRL+C.
Actual behaviour
Detached child processes are killed on reset. If that child process happens to be a java process the app directory will also get spammed with hs_err_pidxxxx.log files that indicate
SIGSEGV
errors. Example:Steps to reproduce
rs
Note: I don't believe this issue exists on windows.
The text was updated successfully, but these errors were encountered: