Skip to content

Restarting containers with arbitrary processes using SIGHUP #34

Answered by ioquatix
ayushn21 asked this question in Q&A
Discussion options

You must be logged in to vote

Okay, a small update. The issue is that this library expects signals to be sent to the progress group, not a specific process.

The reason for this, is that this is the default behaviour of the terminal and IIUC, things like systemd.

In other words, we expect that SIGINT (or SIGwhatever) is sent to all the processes (process group), and the controller waits for them/expects them to exit. Because that doesn't happen, we end up with the new container running alongside the old container.

This isn't an ideal situation, and we should probably handle it better, but I confirmed it does work correctly when using process groups:

#!/usr/bin/env ruby

require "async/container"
require "console"
require 

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@ioquatix
Comment options

Answer selected by ayushn21
@ayushn21
Comment options

@ioquatix
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants