• Home
  • Raw
  • Download

Lines Matching +full:- +full:threadsafe

1 //! Create master and slave virtual pseudo-terminals (PTYs)
48 /// so that when it's consumed or goes out of scope, it's automatically cleaned-up.
53 fn as_raw_fd(&self) -> RawFd { in as_raw_fd()
59 fn into_raw_fd(self) -> RawFd { in into_raw_fd()
72 // invalid file descriptor. That frequently indicates a double-close in drop()
83 fn read(&mut self, buf: &mut [u8]) -> io::Result<usize> { in read()
89 fn write(&mut self, buf: &[u8]) -> io::Result<usize> { in write()
92 fn flush(&mut self) -> io::Result<()> { in flush()
98 fn read(&mut self, buf: &mut [u8]) -> io::Result<usize> { in read()
104 fn write(&mut self, buf: &[u8]) -> io::Result<usize> { in write()
107 fn flush(&mut self) -> io::Result<()> { in flush()
118 pub fn grantpt(fd: &PtyMaster) -> Result<()> { in grantpt()
143 /// # fn run() -> nix::Result<()> {
160 pub fn posix_openpt(flags: fcntl::OFlag) -> Result<PtyMaster> { in posix_openpt()
171 /// [`ptsname(3)`](https://man7.org/linux/man-pages/man3/ptsname.3.html))
181 /// `ptsname()` mutates global variables and is *not* threadsafe.
185 /// For a threadsafe and non-`unsafe` alternative on Linux, see `ptsname_r()`.
187 pub unsafe fn ptsname(fd: &PtyMaster) -> Result<String> { in ptsname()
198 /// [`ptsname(3)`](https://man7.org/linux/man-pages/man3/ptsname.3.html))
201 /// referred to by `fd`. This is the threadsafe version of `ptsname()`, but it is not part of the
202 /// POSIX standard and is instead a Linux-specific extension.
209 pub fn ptsname_r(fd: &PtyMaster) -> Result<String> { in ptsname_r()
231 pub fn unlockpt(fd: &PtyMaster) -> Result<()> { in unlockpt()
241 /// (see [`openpty`](https://man7.org/linux/man-pages/man3/openpty.3.html)).
255 ) -> Result<OpenptyResult> { in openpty()
321 /// (see [`forkpty`](https://man7.org/linux/man-pages/man3/forkpty.3.html)).
329 /// In a multithreaded program, only [async-signal-safe] functions like `pause`
331 /// that memory allocation may **not** be async-signal-safe and thus must be
337 /// [async-signal-safe]: https://man7.org/linux/man-pages/man7/signal-safety.7.html
341 ) -> Result<ForkptyResult> {