summaryrefslogtreecommitdiff
path: root/tests/test-sigsuspend.lua
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test-sigsuspend.lua')
-rw-r--r--tests/test-sigsuspend.lua15
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/test-sigsuspend.lua b/tests/test-sigsuspend.lua
new file mode 100644
index 0000000..5c85e77
--- /dev/null
+++ b/tests/test-sigsuspend.lua
@@ -0,0 +1,15 @@
+local l = require "luxio"
+
+function handler()
+ return
+end
+
+l.sigaction(l.SIGINT, {["sa_handler"] = handler})
+
+s = l.newsigset()
+l.sigfillset(s)
+l.sigdelset(s, l.SIGINT)
+print("Press CTRL-C...")
+l.sigsuspend(s)
+
+print("PASS")