Brandon Williams
Brandon Williams
I can reproduce on a linux system as well - `nodemon -v`: 2.0.10 - `node -v`: v12.21.0 - Operating system/terminal environment: Ubuntu 21.04 on a raspberry pi 4, bash -...
Can the "predefined time frame" be changed? I can't even close a database pool to a local db before nodemon kills it and crashes the database. This is a "guess...
> if you trapped the signal from nodemon then your script would be responsible for stopping That's what I assumed would happen based on the [README](https://github.com/remy/nodemon#controlling-shutdown-of-your-script): > If you need...
I'm looking into this more, I think it's a bug. The code for [`waitForSubProcesses`](https://github.com/remy/nodemon/blob/master/lib/monitor/run.js#L296-L307) has a debug message "still waiting for x sub-process to finish..." and combined with the README...
I used git bisect and determined that this is the breaking commit: 47dfb8be3ff06184793a55d32db4b6171fa2993f. The biggest change I see in that commit is the addition of `child.kill(signal);` before it calls `waitForSubProcesses`....
> _without_ the sub process handling the exit itself meaning don't call `process.exit`? When using this example (and commenting out `child.kill`) the loop completes and nodemon restarts: ```js process.once('SIGUSR2', (signal)...
Without a `SIGUSR2` listener and without `child.kill` it does get killed: ```js console.log('watch.js: process started'); process.stdin.read(); ``` ``` nodemon watch is complete +39ms watch.js: process started rs nodemon bus emit:...
This is my understanding so far, but I don't know enough to fix it and be confident that it doesn't break something else.
I [switched](https://github.com/uselagoon/lagoon/commit/534991a4121a10a44bd1bb37fb7e0c13b4bc67a7#diff-3fde9d1a396e140fefc7676e1bd237d67b6864552b6f45af1ebcc27bcd0bb6e9R82) to [tsc-watch](https://github.com/gilamran/tsc-watch). If you're fine running a patched version, you can make the change in [my previous comment](https://github.com/remy/nodemon/issues/1889#issuecomment-877767479). There's a chance you'll get stuck in an infinite loop...
Unlikely enough that it's not worth testing further? I could scrounge up a IDE drive if there's a chance it could work. The 2 SATA ports work and that's all...