wind: Make sure stdin is always a TTY
All checks were successful
continuous-integration/drone/pr Build is passing
All checks were successful
continuous-integration/drone/pr Build is passing
This commit is contained in:
parent
d5d21e1eb0
commit
a2b6149f50
@ -74,6 +74,12 @@ Result<int> luna_main(int argc, char** argv)
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (!isatty(STDIN_FILENO))
|
||||
{
|
||||
os::eprintln("error: wind must be run from a TTY!");
|
||||
return 1;
|
||||
}
|
||||
|
||||
auto mouse = TRY(os::File::open("/dev/mouse", os::File::ReadOnly));
|
||||
mouse->set_buffer(os::File::NotBuffered);
|
||||
mouse->set_close_on_exec();
|
||||
|
Loading…
Reference in New Issue
Block a user