summaryrefslogtreecommitdiff
path: root/tests/test-sigpending.lua
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test-sigpending.lua')
-rw-r--r--tests/test-sigpending.lua17
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/test-sigpending.lua b/tests/test-sigpending.lua
new file mode 100644
index 0000000..43136b1
--- /dev/null
+++ b/tests/test-sigpending.lua
@@ -0,0 +1,17 @@
+local l = require "luxio"
+
+s = l.newsigset()
+l.sigemptyset(s)
+l.sigaddset(s, l.SIGUSR1)
+l.sigprocmask(l.SIG_BLOCK, s)
+l.raise(l.SIGUSR1)
+
+pending = l.sigpending()
+
+present, errno = l.sigismember(pending, l.SIGUSR1)
+
+if present == 1 then
+ print("PASS")
+else
+ print("FAIL")
+end