-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Redefine signal for architecture mips #40299
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
Conversation
|
I couldn't figure out the best area label to add to this PR. If you have write-permissions please help me learn by adding exactly one area label. |
|
I'm not sure it's the best way to redefine SIGSTOP for architecture mips in Interop.Kill.cs. Maybe we can redefine SIGSTOP in pal_process.c :
|
|
The 4 failing has nothing to do with this PR. |
src/libraries/System.Diagnostics.Process/src/System.Diagnostics.Process.csproj
Outdated
Show resolved
Hide resolved
define SIGSTOP 19 is just ok for architecture x86、arm、s390、powerpc and so on. but others architecture has different values. For architecture mips,you can see kernel source code arch/mips/include/uapi/asm/signal.h
src/libraries/System.Diagnostics.Process/src/System.Diagnostics.Process.csproj
Outdated
Show resolved
Hide resolved
|
Tagging subscribers to this area: @eiriktsarpalis |
src/libraries/Common/src/Interop/Unix/System.Native/Interop.Kill.cs
Outdated
Show resolved
Hide resolved
define SIGSTOP 19 is just ok for architecture x86、arm、s390、powerpc and so on. but others architecture has different values. For architecture mips,you can see kernel source code arch/mips/include/uapi/asm/signal.h Co-Authored-By: hev <[email protected]>
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 would be better to define PAL_... specific enum in pal_process.h (similar to other enums that exist there already). This enum should have just the few signals that we actually need, and this remapping can then be done unconditionally, without hardcoding of magic numbers.
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'm worried that more signals will be added in Interop.Kill.cs (internal enum Signals:int{..}) later.
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.
If that happens, both places will need to be updated. It is same with all other PAL enums.
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.
ok
This reverts commit fcc2d46.
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.
| signal = SIGSTOP; | |
| } | |
| signal = SIGSTOP; | |
| break; | |
| } |
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.
Maybe this can even be:
switch (signal)
{
case PAL_SIGKILL:
signal = SIGKILL;
break;
case PAL_SIGSTOP:
signal = SIGSTOP;
break;
default:
assert_msg(false, "Unknown signal");
break;
}
And delete c_static_assert(PAL_SIGKILL == SIGKILL); at the top of the file. I have verified that clang optimizes the switch out when the remap-signal numbers match.
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.
Thanks!
define SIGSTOP 19 is just ok for architecture x86、arm、s390、powerpc and so on. but others architecture has different values. For architecture mips,you can see kernel source code arch/mips/include/uapi/asm/signal.h Co-Authored-By: hev <[email protected]>
|
Maybe The 11 failing has nothing to do with this PR. |
jkotas
left a comment
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.
Thanks
|
@jkotas it seems like this PR was merged with System.Diagnostics.Process test failures hitting the assert that was added as part of this PR: |
|
I put up a revert here: #40470 |
|
I am sorry. Once I have seen the known problem "CannotRemoveAttribute : Attribute 'System.ComponentModel.TypeConverterAttribute' exists on 'System.ComponentModel.MarshalByValueComponent' " , I have stopped looking through all the failures. |
|
@sunny868 Could you please resubmit with the fix? |
Yeah it is understandable when CI is on the floor because of other things, that things like this could slip through. I'm working on fixing the ApiCompat problem. |
Sorry, I I forgot to reset value "Interop.Sys.Signals.None" to PAL_NONE . I'll resubmit it later. |
define SIGSTOP 19 is just ok for architecture x86、arm、s390、powerpc and so on. but others architecture has different values. Co-Authored-By: hev <[email protected]>
define SIGSTOP 19 is just ok for architecture x86、arm、s390、powerpc and so on.
but others architecture has different values.
For architecture mips,you can see kernel source code arch/mips/include/uapi/asm/signal.h