Skip to content
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

Support sending control signals to DSC #150

Closed
BerheAbrha opened this issue Aug 9, 2023 · 3 comments · Fixed by #177
Closed

Support sending control signals to DSC #150

BerheAbrha opened this issue Aug 9, 2023 · 3 comments · Fixed by #177
Assignees
Labels
Issue-Enhancement The issue is a feature or idea

Comments

@BerheAbrha
Copy link

BerheAbrha commented Aug 9, 2023

Summary of the new feature / enhancement

  • When other agents are invoking DSC and if issued operation need to stop. It will need a way to send control signal to the child process.

Proposed technical implementation details (optional)

Send event to parent process so it can close the process handle.

WINDOWS

API DOC for sending events: - https://learn.microsoft.com/en-us/windows/win32/api/synchapi/nf-synchapi-createeventa

LINUX

https://www.tutorialspoint.com/unix_system_calls/sigaction.htm
@Bpoe
Copy link
Collaborator

Bpoe commented Aug 10, 2023

Would responding to SIGINT as a request to stop meet the needs?
(https://stackoverflow.com/questions/813086/can-i-send-a-ctrl-c-sigint-to-an-application-on-windows)

@michaeltlombardi
Copy link
Collaborator

The Rust CLI book has a chapter on signal handling, which points to the signal_hook crate as an option.

It looks like the crate currently supports signals fully for not-Windows, and supports a limited subset of signals on windows, notably including SIGABRT, SIGBREAK, SIGINT, and SIGTERM.

@SteveL-MSFT SteveL-MSFT self-assigned this Aug 29, 2023
@michaeltlombardi michaeltlombardi added the Issue-Enhancement The issue is a feature or idea label Aug 30, 2023
@jodi-boone
Copy link
Collaborator

Please re-open as we need to ensure child processes are killed as well as parent.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue-Enhancement The issue is a feature or idea
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

5 participants