-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Add Crystal::System::Process to split out system-specific implementations #9035
Conversation
Int64 is enough to fit the actual underlying values of different platforms (Int32 on Linux, UInt32 on Windows). This will allow to make Process cross-platform without returning a different type to users on different platforms.
…ions Note that most of this change is just extracting parts of process.cr, mostly unchanged. To see that for yourself, make sure to view the patch as `git diff -w HEAD~:src/process.cr src/crystal/system/unix/process.cr` Co-Authored-By: Stephanie Hobbs <[email protected]>
LibC.pthread_sigmask(LibC::SIG_SETMASK, pointerof(newmask), nil) | ||
else | ||
{% unless flag?(:preview_mt) %} | ||
::Process.after_fork_child_callbacks.each(&.call) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't after_fork_child
be moved to Crystal::System, too?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know (like, actually could be conceptually the wrong thing to do) and it's certainly not a requirement to make things work.
From my side this is ready, only as squash-merge.
|
I've already added it to the milestone (which effectively signals it's accepted). Just waiting for CI to finish. |
Thanks! |
Thanks |
…ions (crystal-lang#9035) Note that most of this change is just extracting parts of process.cr, mostly unchanged. To see that for yourself, make sure to view the patch as `git diff -w HEAD~:src/process.cr src/crystal/system/unix/process.cr` Co-authored-by: Stephanie Hobbs <[email protected]>
Note that most of this change is just extracting parts of process.cr, mostly unchanged.
To see that for yourself, make sure to view the patch as
git diff -w master:src/process.cr src/crystal/system/unix/process.cr
This is based on RX14@ed14ad5
The Windows counterpart of this
Closes #8536