MCPcopy Create free account
hub / github.com/bytecodealliance/rustix / sid_notty

Function sid_notty

tests/termios/sid.rs:7–18  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

5#[cfg(feature = "fs")]
6#[test]
7fn sid_notty() {
8 let tmpdir = tempdir().unwrap();
9 let fd = rustix::fs::open(
10 tmpdir.path(),
11 rustix::fs::OFlags::RDONLY,
12 rustix::fs::Mode::empty(),
13 )
14 .unwrap();
15
16 // A file is not a tty.
17 assert_eq!(tcgetsid(&fd), Err(Errno::NOTTY));
18}
19
20// Disable on Redox which lacks `getsid`.
21#[cfg(not(target_os = "redox"))]

Callers

nothing calls this directly

Calls 2

openFunction · 0.50
pathMethod · 0.45

Tested by

no test coverage detected