Sign in
kernel
/
pub
/
scm
/
libs
/
klibc
/
klibc
/
1a6b40cdb9b3a9671c5e56dee864e94cc19df7dd
/
.
/
usr
/
klibc
/
isatty.c
blob: 2359479a82a11060f925dd23328932af208ad626 [
file
] [
log
] [
blame
]
/*
* isatty.c
*/
#include
<unistd.h>
#include
<termios.h>
#include
<errno.h>
int
isatty
(
int
fd
)
{
struct
termios dummy
;
/* All ttys support TIOCGPGRP */
/* except /dev/console which needs TCGETS */
return
!
ioctl
(
fd
,
TCGETS
,
&
dummy
);
}