[libc-commits] [PATCH] D76536: [libc] Add signal
Siva Chandra via Phabricator via libc-commits
libc-commits at lists.llvm.org
Sat Mar 21 22:57:11 PDT 2020
sivachandra accepted this revision.
sivachandra added a comment.
This revision is now accepted and ready to land.
OK with one naming fix suggested inline.
================
Comment at: libc/spec/stdc.td:19
+ NamedType SigHandlerT = NamedType<"sighandler_t">;
+
----------------
Neither POSIX nor std C prescribe it. Is it present merely as a convenience or because there is no way to describe function types using tablegen? Either way, I think this is OK. But to avoid name pollution, we should name this type with `__` prefix.
================
Comment at: libc/src/signal/linux/signal.cpp:21
+ action.sa_flags = SA_RESTART;
+ return __llvm_libc::sigaction(signum, &action, &old) == -1 ? SIG_ERR
+ : old.sa_handler;
----------------
Add a note that `sigaction` sets the `errno` value on error?
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D76536/new/
https://reviews.llvm.org/D76536
More information about the libc-commits
mailing list