terminal-util: introduce isatty_safe that rejects EBADF
This commit is contained in:
@@ -86,6 +86,8 @@
|
||||
/* Set cursor to top left corner and clear screen */
|
||||
#define ANSI_HOME_CLEAR "\x1B[H\x1B[2J"
|
||||
|
||||
bool isatty_safe(int fd);
|
||||
|
||||
int reset_terminal_fd(int fd, bool switch_to_text);
|
||||
int reset_terminal(const char *name);
|
||||
int set_terminal_cursor_position(int fd, unsigned int row, unsigned int column);
|
||||
|
||||
Reference in New Issue
Block a user