Zombie process when killing `make dev`
STR:
- Launch
make dev
- When the server is being built, kill
make dev
with Ctrl + C (if you do it when the client is being built, this won't work)
Observed:
- You just lost control over the client build script, and cannot kill them with Ctrl+C
A first analysis has shown the main problem is a bug in npm (used to run the server build), even though all scripts miss set -e
to also fail correctly. When using npm run something
inside a shell script, it won't return the error code of the script behind the command something
(using scripty
or not - same analysis with concurrently
).
An easy fix would be to replace npm by yarn in all scripts (and add yard to the dev dependencies)
Edited by Antoine