Open
Description
Hi,
I've found a superweird bug that I'd like some help to figure out what to do with.
When running concurrently in my node-alpine docker container, PIDs are (consistently) one off.
To test this, I modified concurrently to print the PID first when spawning a child process, and also when trying to kill them in killOtherProcesses
. http-server is constantly one higher than the saved PID.
Example output:
bash-4.3# ps aux
PID USER TIME COMMAND
1 root 0:00 bash
1293 root 0:00 ps aux
bash-4.3# concurrently --kill-others "http-server ." "npm --version" &
[1] 1294
1300
1307
[0] Starting up http-server, serving .
[0] Available on:
[0] http://127.0.0.1:8080
[0] http://172.17.0.3:8080
[0] Hit CTRL-C to stop the server
[1] 4.4.4
[1] npm --version exited with code 0
--> Sending SIGTERM to other processes..
1300
bash-4.3# ps
PID USER TIME COMMAND
1 root 0:00 bash
1294 root 0:00 node /usr/bin/concurrently --kill-others http-server . npm --version
1301 root 0:00 node /usr/bin/http-server .
1315 root 0:00 ps
So it's trying to kill http-server on 1300, but http-server is actually on 1301. If I change the code to kill child.pid+1
instead, all is fine...
Any ideas? I'm stumped for ideas where to look further.