Skip to content

Conversation

@mc256
Copy link
Contributor

@mc256 mc256 commented Dec 9, 2020

So I want to run the container a bit longer until it finishes all the
work for optimization. This option allows the container to wait until a
keyboard signal (Ctrl-C) or a signal from other programs.

Added this option to ctr-remote i optimize command:

 --wait-on-signal             ignore context cancel and keep the container running until it receives signal (Ctrl + C) sent manually

Signed-off-by: Jun Lin Chen [email protected]

case <-sc:
log.G(ctx).Info("signal detected")
if ignoreCtxCancel {
log.G(ctx).Debugf("press Ctrl+C to terminate the container %q", id)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we make it Infof? This information seems important for user.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure!

So I want to run the container a bit longer until it finishes all the work for optimization. This option allows the container to wait until a keyboard signal (`Ctrl-C`) or a signal from other programs.

Added this option to `ctr-remote i optimize` command:
```
 --wait-on-signal             ignore context cancel and keep the container running until it receives signal (Ctrl + C) sent manually
```

Signed-off-by: Jun Lin Chen <[email protected]>
Copy link
Member

@ktock ktock left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@ktock ktock merged commit a85d05d into containerd:master Dec 10, 2020
@mc256 mc256 deleted the wait-on-signal branch December 10, 2020 01:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants