- Notifications
You must be signed in to change notification settings - Fork5.2k
Implement PosixSignal API#54136
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Merged
Uh oh!
There was an error while loading.Please reload this page.
Merged
Changes from1 commit
Commits
Show all changes
65 commits Select commitHold shift + click to select a range
11a94bb Implement PosixSignal API
tmdsae4d67e PosixSignalRegistration: implement finalizer
tmds72a2475 Support using positive PosixSignal values as raw signal numbers
tmds17045d8 Reduce nr of TargetFrameworks
tmds61a0fba #ifdef SIGRTMAX
tmdsb5ae07a Don't throw Win32Exception (for now)
tmds52e1f17 Rename PosixSignalRegistration.cs to PosixSignalRegistration.Unsuppor…
tmds26f22b3 Spawn new Thread only for specific signals
tmds0bd03f9 Add PosixSignal.SIGCONT, SIGWINCH, SIGTTIN, SIGTTOU, SIGTSTP
tmdse8d01c8 SystemNative_DefaultSignalHandler: remove SuppressGCTransition attribute
tmds6cc2d89 Update comment in SystemNative_InitializeTerminalAndSignalHandling
tmds5892f0d Run original handler except for cancelable signals.
tmdsf337677 Cleanup ControlCHandlerRegistrar
tmdsc3dce04 Handle TryGetTarget returning false due to finalized PosixSignalRegis…
tmdsdb75bba Use Thread.UnsafeStart
tmds96ded59 Remove SuppressGCTransition from methods that take a lock
tmds55f1abe Support canceling terminal configuration on SIGCHLD/SIGCONT
tmds7a2594c Throw for errno using Interop.CheckIO
tmds9c27d6e Rename DefaultSignalHandler to HandleNonCanceledPosixSignal
tmdsb5ed74d Register Console SIGTTOU with SA_RESETHAND
tmds76b8704 Allocate storage for tracking signals dynamically
tmds5f5deb3 Propagate sigaction errors when enabling PosixSignal
tmds03c03b8 Add some tests
tmds6f0c69b Fix entrypoints
tmdsd873120 Fix compilation
tmdsbc1590c Add some more tests
tmdse8827ce Move tests to PosixSignalRegistrationTests.Unix file
tmds511f604 Add SignalCanCancelTermination test
tmds1d15e42 ConfigureTerminalForChildProcesses: split Unix and iOS
tmdsa760612 Fix iOS compilation failure
tmdsdddc5bc Skip signals that cause xunit to exit with non zero
tmdsd4c8e24 Try fix Android compilation
tmds12150ab Remove SIGSTOP from UninstallableSignalsThrow because it doesn't thro…
tmds469b6fe Cleanup
tmds38a4d76 Handle case where all handlers got disposed by the time we want to ca…
tmds8841d41 GenerateReferenceAssemblySource
tmdsc2ef9eb Replace PosixSignalRegistration.Unsupported with .Windows/.Browser file
tmds575dd7d Remove assert(g_hasTty) from UninitializeTerminal
tmds3756ac2 Initialize signal handling when ifndef HAS_CONSOLE_SIGNALS
tmds778350f Fix broken Cancel
tmdsed39929 Use SIGRTMAX as highest usable signal number.
tmds3c02835 SIGRTMAX is not defined on all platforms, fall back to NSIG
tmds8ccfd3e Resend signal only when restored to SIG_DFL
tmds481f40e SignalCanCancelTermination test: increase timeout
tmds669e09f Increase timeout to 10min
tmds2cb8cda Update expected SIGQUIT exit code for mono
tmds459f3e6 Change isMono check
tmds834350f Use PlatformDetection.IsMonoRuntime
tmdsc8cb449 Add IsSignalThatTerminates method
tmdscba68f3 Add some documentation xml
tmds19d30d6 Console.ManualTests: test terminal echo during and after child proces…
tmdse4cef47 Maintain flags and mask of original handler
tmdsaa549a3 PR feedback
tmds324db13 SystemNative_HandleNonCanceledPosixSignal: update handling based on d…
tmds8e830fe Apply suggestions from code review
tmds85439d6 Don't call sa_sigaction/sa_handler twice from SystemNative_HandleNonC…
tmdsb8a0b5d Don't remove WeakReferences while iterating.
tmds18b7139 Move static fields to the top of the class
tmdsd136c5b Remove -Wcast-qual ignore
tmdsbe93c17 PosixSignalContext: add XML docs
tmds4de318a Fix Android compilation
tmds6898402 Fix Android compilation, take II
tmdsb8234bd Fix comment
tmdsf1aee19 Add PosixSignalContext constructor test
tmds005cddd SystemNative_HandleNonCanceledPosixSignal: add SIG_IGN case
tmdsFile filter
Filter by extension
Conversations
Failed to load comments.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Jump to file
Failed to load files.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
PosixSignalContext: add XML docs
- Loading branch information
Uh oh!
There was an error while loading.Please reload this page.
commitbe93c17cb7dd380e11b56393893a7cb6ae1c3033
There are no files selected for viewing
21 changes: 15 additions & 6 deletions...s/System.Runtime.InteropServices/src/System/Runtime/InteropServices/PosixSignalContext.cs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -3,28 +3,37 @@ | ||
| namespace System.Runtime.InteropServices | ||
| { | ||
| /// <summary> | ||
| /// Provides data for a <see cref="PosixSignalRegistration"/> event. | ||
| /// </summary> | ||
| public sealed class PosixSignalContext | ||
tmds marked this conversation as resolved. Show resolvedHide resolvedUh oh!There was an error while loading.Please reload this page. | ||
| { | ||
| /// <summary> | ||
| /// Initializes a new instance of the <see cref="PosixSignalContext"/> class. | ||
| /// </summary> | ||
| public PosixSignalContext(PosixSignal signal) | ||
| { | ||
| Signal = signal; | ||
| } | ||
tmds marked this conversation as resolved. Show resolvedHide resolvedUh oh!There was an error while loading.Please reload this page. | ||
| /// <summary> | ||
| /// Gets the signal that occurred. | ||
| /// </summary> | ||
| public PosixSignal Signal | ||
| { | ||
| get; | ||
| internal set; | ||
| } | ||
| /// <summary> | ||
| ///Gets or sets a value that indicates whether to cancel thedefault handling of the signal. The default is is <see langword="false"/>. | ||
tmds marked this conversation as resolved. OutdatedShow resolvedHide resolvedUh oh!There was an error while loading.Please reload this page. | ||
| /// </summary> | ||
| public bool Cancel | ||
| { | ||
| get; | ||
| set; | ||
| } | ||
| internal PosixSignalContext() | ||
| { } | ||
| } | ||
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.