kudulab/dojo

Ctrl+C does not stop docker pull when dojo action is: run

xmik opened this issue · 0 comments

xmik commented

Dojo reacts on signals.

When we use Dojo action: pull, the docker pull command is run in the same process group as dojo process and thus Ctrl+C signal sent to dojo process is also sent to docker pull process.

However, when we use Dojo action: run, the docker run command is run in a new process group. Ctrl+C signal sent to dojo process is not sent to docker run process, but Dojo recognizes the signal and takes steps to stop the container(s) and to perform cleanup. Those steps (among other things) check if a container(s) was ever created. If it was created, dojo stops the container. If it was not yet created, dojo thinks there is no container process to stop and just waits for the main to exit. But there is docker pull process running and thus main does not exit fast.