Commit fafd8919 authored by ticki's avatar ticki Committed by GitHub

Merge pull request #116 from jackpot51/patch-1

Update tty.rs
parents bc33fe14 da9a604c
use std::{fs, io};
use std::os::unix::io::AsRawFd;
/// Is this stream an TTY?
/// Is this stream a TTY?
#[cfg(not(target_os = "redox"))]
pub fn is_tty<T: AsRawFd>(stream: &T) -> bool {
use libc;
......@@ -9,7 +9,7 @@ pub fn is_tty<T: AsRawFd>(stream: &T) -> bool {
unsafe { libc::isatty(stream.as_raw_fd()) == 1 }
}
/// This will panic.
/// Is this stream a TTY?
#[cfg(target_os = "redox")]
pub fn is_tty<T: AsRawFd>(stream: &T) -> bool {
use syscall;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment