Uh oh!
There was an error while loading. Please reload this page.
Implement PosixSignal API - #54136
Conversation
ghost
commented
Jun 14, 2021
Note regarding the This serves as a reminder for when your PR is modifying a ref *.cs file and adding/modifying public APIs, to please make sure the API implementation in the src *.cs file is documented with triple slash comments, so the PR reviewers can sign off that change. |
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
I've manually added these to the ref file, I don't know if there is an automated way.
There was a problem hiding this comment.
The automated way is documented in https://github.com/dotnet/runtime/blob/main/docs/coding-guidelines/updating-ref-source.md . It would be a good idea to rerun the automated process to make sure that the formatting is right.
There was a problem hiding this comment.
But beware, it currently removes attributes...
There was a problem hiding this comment.
I ran it and copied in the PosixSignal bits.
I'm surprised to see internal instead of private on the PosixSignalRegistration constructor.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
andyleejordan
commented
Jun 15, 2021
Hey, I just wanted to drop by and say it's really exciting to see this work! 🥳 |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
tmds
commented
Jun 18, 2021
The implementation has changed a bit since the initial PR.
The implementation will call the original It handles specifically what is cancelable by the runtime using
I'll look at writing some tests next week. |
alexrp
commented
Jun 18, 2021
Just posting here as well so it doesn't get missed: I think it's worth considering a rename to |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
lambdageek
commented
Jun 18, 2021
@tmds what's the expected behavior if users set up a handler for a signal that the runtime uses internally. For example, the mono GC uses signals on non-Apple Unixes to suspend threads that are in preemptive mode - we pick the signal dynamically and use runtime/src/mono/mono/utils/mono-threads-posix-signals.c Lines 48 to 119 in f37f0b9 Should we have some mechanism that the runtime could use to prevent users from installing handlers for these signals? |
tmds
commented
Jun 21, 2021
By default the original handler gets called.
I don't have a strong opinion if we should forbid certain values. |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Co-authored-by: Stephen Toub <stoub@microsoft.com>
…anceledPosixSignal.
tmds
commented
Jul 5, 2021
CI fail is unrelated. |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Co-authored-by: Stephen Toub <stoub@microsoft.com>
stephentoub
commented
Jul 8, 2021
Thanks! |
Implements #50527.
I still need to add tests.
Can you do a first review of the implementation?
cc @janvorli@jkotas@stephentoub@davidfowl@bartonjs