diff options
Diffstat (limited to 'test/test_unistd.rs')
-rw-r--r-- | test/test_unistd.rs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/test_unistd.rs b/test/test_unistd.rs index e15fec17..d0db55f6 100644 --- a/test/test_unistd.rs +++ b/test/test_unistd.rs @@ -107,6 +107,14 @@ fn test_getpid() { assert!(ppid > 0); } +#[test] +fn test_getsid() { + let none_sid: ::libc::pid_t = getsid(None).unwrap().into(); + let pid_sid: ::libc::pid_t = getsid(Some(getpid())).unwrap().into(); + assert!(none_sid > 0); + assert!(none_sid == pid_sid); +} + #[cfg(any(target_os = "linux", target_os = "android"))] mod linux_android { use nix::unistd::gettid; |