-
Notifications
You must be signed in to change notification settings - Fork 32
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
[BUG] Containers are not stopped on Ctrl+C #531
Comments
The first attempt was done here: #523 |
After some debugging I found out why pexpect doesn't kill all children on keyboard interrupt especially in case of mlcube+docker run, while working well in other cases. So, Ctrl+C in terminal send SIGINT to all the processes of the current process group (in our case to medperf python process). So, pexpect is not compatible exactly with cases when child process run docker run. Discussed solution is to replace |
Previous idea with
That's too complex solution, though it brings some advantages:
|
So, I implemented another solution: Here we are using
Main disadvantage is that we are assuming our children are not spawning any ancestor processes in a third new process group (such a grandchildren would be orphaned). But it looks like a justice price for simple solution |
thanks @VukW for documenting all this useful information. |
If a user does CTRL+C during an MLCube call, the MLCube process doesn't close, leaving a dangling and compute-intesive process running in the background
The text was updated successfully, but these errors were encountered: