summaryrefslogtreecommitdiff
path: root/tests/test-sigpending.lua
diff options
context:
space:
mode:
authorRichard Ipsum <richardipsum@vx21.xyz>2019-10-04 23:28:49 +0100
committerDaniel Silverstone <dsilvers@digital-scurf.org>2019-10-06 09:22:07 +0100
commit4c42af5fd9b2bb8cc2c37c71314b8c443cf80392 (patch)
treec3993b270ccdfa757ba310c42da0ae7c5b9d9351 /tests/test-sigpending.lua
parentedeef019e8ad8b60f0547a854dc7763f98ff4c40 (diff)
downloadluxio-4c42af5fd9b2bb8cc2c37c71314b8c443cf80392.tar.bz2
Add sigpending, sigsuspend, sigwait, sigwaitinfo, sigtimedwait and raise
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