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

Function pgrp_notty

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

Source from the content-addressed store, hash-verified

5#[cfg(feature = "fs")]
6#[test]
7fn pgrp_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!(tcgetpgrp(&fd), Err(Errno::NOTTY));
18 assert_eq!(tcsetpgrp(&fd, Pid::INIT), Err(Errno::NOTTY));
19}
20
21// Disable on illumos where `tcgetattr` doesn't appear to support
22// pseudoterminals. And on Redox which lacks `NOCTTY`.

Callers

nothing calls this directly

Calls 2

openFunction · 0.50
pathMethod · 0.45

Tested by

no test coverage detected