MCPcopy Index your code
hub / github.com/RustPython/RustPython / is_pty_child

Function is_pty_child

crates/vm/src/stdlib/builtins.rs:743–747  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

741 /// In this case, rustyline may hang because it uses raw mode.
742 #[cfg(unix)]
743 fn is_pty_child() -> bool {
744 use nix::unistd::{getpid, getsid};
745 // If this process is a session leader, we're likely in a PTY child
746 getsid(None) == Ok(getpid())
747 }
748
749 #[cfg(not(unix))]
750 fn is_pty_child() -> bool {

Callers 1

inputFunction · 0.85

Calls 2

getsidFunction · 0.85
getpidFunction · 0.85

Tested by

no test coverage detected