-
-
Notifications
You must be signed in to change notification settings - Fork 3k
linux: emulate wait4 using waitid #25183
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
base: master
Are you sure you want to change the base?
Conversation
8c54475
to
545ef7c
Compare
To clarify, whatever handling we do for this should be at a higher level such as But that aside, could we just always use |
Yes technically the So in order to provide all of these I think we have to do emulation in the system layer. Unfortunately we also can't just make higher level code such as |
There are other functions in In fact, this situation seems basically identical to the |
Hmm I see, but then we definitely need to include the I think the problem is that |
It's fine for I don't believe |
That's surprising to me, because But I agree it makes sense, I'll try to move the emulation to |
The line is admittedly a bit fuzzy, but "simple" emulation where all we need to do is straightforwardly invoke another syscall is generally OK. Extra logic beyond that starts to get into "basically implementing libc" territory, which is not what And yeah, that doc comment is just wrong. |
545ef7c
to
63728e2
Compare
63728e2
to
a6320e6
Compare
Now I'm wondering if we should either remove sidenote: I am also once again not sure why that one test is failing :D |
Implements
posix.wait4
usingwaitid
on Linux, because thewait4
syscall is not always available on newer architectures (e.g. riscv32).At the moment we don't seem to have constants defined for the siginfo codes, so I used the numbers directly since I don't know if and where those constants should be added.
Closes #23262