Skip to content

cli: Add support for --stop-signal#1462

Open
dcantah wants to merge 1 commit intoapple:mainfrom
dcantah:stop-signal
Open

cli: Add support for --stop-signal#1462
dcantah wants to merge 1 commit intoapple:mainfrom
dcantah:stop-signal

Conversation

@dcantah
Copy link
Copy Markdown
Member

@dcantah dcantah commented Apr 28, 2026

This adds stop signal support to the cli. The priority is:

  1. If an explicit stop signal is passed on the cli use this.
  2. If not, check if there is a stop signal in the image config.
  3. Finally, use the default (TERM).

This adds stop signal support to the cli. The priority is:

1. If an explicit stop signal is passed on the cli use this.
2. If not, check if there is a stop signal in the image config.
3. Finally, use the default (TERM).
@github-actions github-actions Bot added the cli label Apr 28, 2026
guard let proc = processInfo.process else {
throw ContainerizationError(.invalidState, message: "process \(id) not started")
}
try await proc.kill(Int32(try message.signal()))
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

should this be updated now as well?

}

// TODO: fix underlying signal value to int64
try await ctr.container.kill(Int32(try message.signal()))
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

same here

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I'd prefer them to be strings as well, but I'd rather do in a follow-up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants