Fix Redox get_tty
This commit is contained in:
parent
07301d4c24
commit
7e3ed4ec93
|
@ -20,7 +20,7 @@ pub fn is_tty<T: AsRawFd>(_stream: T) -> bool {
|
||||||
/// This allows for getting stdio representing _only_ the TTY, and not other streams.
|
/// This allows for getting stdio representing _only_ the TTY, and not other streams.
|
||||||
#[cfg(target_os = "redox")]
|
#[cfg(target_os = "redox")]
|
||||||
pub fn get_tty() -> io::Result<fs::File> {
|
pub fn get_tty() -> io::Result<fs::File> {
|
||||||
fs::OpenOptions::new().read(true).write(true).open(env::var("TTY")?)
|
fs::OpenOptions::new().read(true).write(true).open(try!(env::var("TTY")))
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Get the TTY device.
|
/// Get the TTY device.
|
||||||
|
|
Loading…
Reference in New Issue