mirror of
https://codeberg.org/ziglang/zig.git
synced 2025-12-06 05:44:20 +00:00
Add test for kill 0
This commit is contained in:
parent
9781e02eea
commit
5aff6cd7b6
1 changed files with 9 additions and 0 deletions
|
|
@ -980,3 +980,12 @@ const CommonOpenFlags = packed struct {
|
|||
return result;
|
||||
}
|
||||
};
|
||||
|
||||
test "kill 0 can be used to perform checks of sending signal" {
|
||||
if (native_os == .wasi) return error.SkipZigTest;
|
||||
if (native_os == .windows) return error.SkipZigTest;
|
||||
posix.kill(posix.getpid(), .INVAL) catch |err| switch (err) {
|
||||
posix.KillError.PermissionDenied => return,
|
||||
else => return err,
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue