Page MenuHomePhabricator

[libc] Add sigfillset and sigdelset
ClosedPublic

Authored by abrachet on Mar 27 2020, 9:45 AM.

Details

Summary

Add's sigfillset and sigdelset which will be used in D76676.

Diff Detail

Event Timeline

abrachet created this revision.Mar 27 2020, 9:45 AM
sivachandra accepted this revision.Mar 31 2020, 10:34 PM
sivachandra marked an inline comment as done.
sivachandra added inline comments.
libc/src/signal/linux/sigdelset.cpp
20

Not a blocker but just something which struck my mind as I was reading the POSIX docs again today. POSIX doesn't seem to care about set == nullptr. We could still detect an invalid set and set a different error may be so that we don't step on POSIX's way of setting EINVAL for a bad signum. May be EFAULT? Whatever we do, we need to do it consistently across all of these related functions. Since sigaddset already has similar code, we can keep it as is here for now.

This revision is now accepted and ready to land.Mar 31 2020, 10:34 PM
abrachet marked an inline comment as done.Apr 1 2020, 12:07 PM
abrachet added inline comments.
libc/src/signal/linux/sigdelset.cpp
20

Sounds good to use EFAULT here and the other sig*set functions when the set is null in another patch.

This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptApr 1 2020, 12:23 PM