Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(585)

Unified Diff: fusl/src/signal/siginterrupt.c

Issue 1573973002: Add a "fork" of musl as //fusl. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « fusl/src/signal/sigignore.c ('k') | fusl/src/signal/sigisemptyset.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: fusl/src/signal/siginterrupt.c
diff --git a/fusl/src/signal/siginterrupt.c b/fusl/src/signal/siginterrupt.c
new file mode 100644
index 0000000000000000000000000000000000000000..70063400325c0f74f82235ffc4b9440dd4e264f2
--- /dev/null
+++ b/fusl/src/signal/siginterrupt.c
@@ -0,0 +1,12 @@
+#include <signal.h>
+
+int siginterrupt(int sig, int flag)
+{
+ struct sigaction sa;
+
+ sigaction(sig, 0, &sa);
+ if (flag) sa.sa_flags &= ~SA_RESTART;
+ else sa.sa_flags |= SA_RESTART;
+
+ return sigaction(sig, &sa, 0);
+}
« no previous file with comments | « fusl/src/signal/sigignore.c ('k') | fusl/src/signal/sigisemptyset.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698