diff options
| author | LemonBoy <thatlemon@gmail.com> | 2019-05-28 15:22:19 +0200 |
|---|---|---|
| committer | LemonBoy <thatlemon@gmail.com> | 2019-05-28 15:22:19 +0200 |
| commit | bcdbd8d1697725992cb08eb1c3c59bd63fda6dc7 (patch) | |
| tree | f70669bd50dbc98cde112ef14ac18078a56412ae /std/os/linux | |
| parent | d1b6f29d225bbedd0afb97fce64f5d042df4d9c6 (diff) | |
| download | zig-bcdbd8d1697725992cb08eb1c3c59bd63fda6dc7.tar.gz zig-bcdbd8d1697725992cb08eb1c3c59bd63fda6dc7.zip | |
Add sigaltstack syscall
Diffstat (limited to 'std/os/linux')
| -rw-r--r-- | std/os/linux/test.zig | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/std/os/linux/test.zig b/std/os/linux/test.zig index c78b071c74..063c10257c 100644 --- a/std/os/linux/test.zig +++ b/std/os/linux/test.zig @@ -83,3 +83,12 @@ test "dl_iterate_phdr" { expect(linux.dl_iterate_phdr(usize, iter_fn, &counter) != 0); expect(counter != 0); } + +test "sigaltstack" { + var st: linux.stack_t = undefined; + expect(linux.sigaltstack(null, &st) == 0); + // Setting a stack size less than MINSIGSTKSZ returns ENOMEM + st.ss_flags = 0; + st.ss_size = 1; + expect(linux.getErrno(linux.sigaltstack(&st, null)) == linux.ENOMEM); +} |
