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

Disable Process.pgid spec on Windows #13476

Merged

Conversation

HertzDevil
Copy link
Contributor

Process.pgid is not implemented on Windows and there is a pending spec for it. There are some Windows analogs to POSIX process group IDs:

  • Console process groups control how processes receive Ctrl+C and Ctrl+Break interrupts. The process group ID is same as the process ID when CREATE_NEW_PROCESS_GROUP is given to CreateProcess, but it doesn't look like Win32 exposes a way to retrieve the ID itself for an arbitrary child process or whether this option was given to a process.
  • Job objects can also be viewed as process groups. They are named Win32 objects so they technically have a string ID rather than a numeric one, but those names are for internal use only.
  • Whatever Cygwin does.

It is unlikely there will ever be a suitable analog on Windows. This PR permanently disables this pending spec on Windows.

@HertzDevil HertzDevil added platform:windows Windows support based on the MSVC toolchain / Win32 API kind:specs topic:stdlib:system labels May 16, 2023
@straight-shoota straight-shoota added this to the 1.9.0 milestone May 16, 2023
@straight-shoota straight-shoota merged commit 3c43a93 into crystal-lang:master May 22, 2023
@HertzDevil HertzDevil deleted the spec/windows-process-pgid branch May 23, 2023 08:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind:specs platform:windows Windows support based on the MSVC toolchain / Win32 API topic:stdlib:system
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants