Add Windows PID-based kill command --from winuxcmd project#46
Add Windows PID-based kill command --from winuxcmd project#46a-rookie-of-C-language wants to merge 3 commits into
Conversation
…ters it in the multi-call binary, and documents the limited TERM/KILL compatibility semantics.
|
@microsoft-github-policy-service agree |
|
Nice direction. I checked the GNU coreutils
TERM/KILL mapping to |
|
Thank you for your suggestion, I have now added the above support. This is indeed something I had not considered, but it is a very useful command argument. kill -0 PID / kill -s 0 PID: a non-destructive probe, using OpenProcess(PROCESS_TERMINATE) to check if there is permission to open the target process, without calling TerminateProcess. |
|
Great improvements. One repo-layout question: most non-uutils commands here seem to live under Not sure what layout the maintainers prefer here, but it may be worth deciding before this grows. |
|
Good point. I moved the Windows-specific implementation into a small |
Summary
Adds a Windows-specific
killimplementation to the multi-call binary.The new implementation supports PID-based process termination using Windows process APIs.
TERMandKILLare accepted for compatibility and both map to Windows process termination.Fixes #45
Details
src/kill.rsWindows shim.killin the generated utility map.OpenProcess(PROCESS_TERMINATE)andTerminateProcess.timeoutout of scope.Validation
cargo fmt --checkcargo test --bin coreutils kill::testscargo check --bin coreutilsgit diff --checkcoreutils.exe kill <pid>against a temporary sleep process.