Skip to content

chore(shutdown): allow Shutdown to work on Windows#391

Open
zaharidichev wants to merge 6 commits intoolix0r:mainfrom
zaharidichev:zd/windows-shutdown
Open

chore(shutdown): allow Shutdown to work on Windows#391
zaharidichev wants to merge 6 commits intoolix0r:mainfrom
zaharidichev:zd/windows-shutdown

Conversation

@zaharidichev
Copy link
Copy Markdown
Collaborator

At the moment the shutdown feature cannot be used on Windows systems. This change abstracts the signal handling functionality so

  • Ctrl-C and Ctrl-Break signals are used on Windows
  • SIGINT and SIGTERM are used on Linux

Signed-off-by: Zahari Dichev zaharidichev@gmail.com

Signed-off-by: Zahari Dichev <zaharidichev@gmail.com>
Signed-off-by: Zahari Dichev <zaharidichev@gmail.com>
@zaharidichev zaharidichev requested a review from olix0r July 8, 2025 06:44
Comment on lines +53 to +54
let ctrl_break = ctrl_break()?;
let ctrl_c = ctrl_c()?;
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Why these signals? Why not the other signals? Can you reference some external resource or prior art that explains what we're doing here?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

You are right. After some research, It becomes clear that the signal that Kubernetes uses for graceful shutdown is Ctrl-Shutdown. I have made the corresponding changes. For reference: https://kubernetes.io/docs/concepts/windows/intro/#compatibility-v1-pod

Signed-off-by: Zahari Dichev <zaharidichev@gmail.com>
Signed-off-by: Zahari Dichev <zaharidichev@gmail.com>
Signed-off-by: Zahari Dichev <zaharidichev@gmail.com>
@zaharidichev zaharidichev requested a review from olix0r July 16, 2025 08:35
Comment on lines +33 to +39
@just-cargo target={{ target }} fetch

check *args:
@just-cargo check --workspace --all-targets {{ _features }} {{ args }}

clippy-all *args:
@just-cargo clippy --workspace --all-targets --all-features {{ args }}
@just-cargo target={{ target }} clippy --workspace --all-targets --all-features {{ args }}
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

we need to make this consistent -- if we need it in clippy-all, we should have it on clippy (and check, etc)

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