3 ms·
Shame the post does not go deeper and explain that isatty() is a standard C function specified by POSIX[1]. Depending on the implementation, GNU for example, is
by MisterTea 4mo ago
Shame the post does not go deeper and explain that isatty() is a standard C function specified by POSIX[1]. Depending on the implementation, GNU for example, isatty() calls tcgetattr(3) which performs an ioctl syscall.
1. https://codebrowser.dev/glibc/glibc/sysdeps/posix/isatty.c.html https://codebrowser.dev/glibc/glibc/sysdeps/posix/isatty.c.h...
2. https://codebrowser.dev/glibc/glibc/sysdeps/unix/sysv/linux/tcgetattr.c.html https://codebrowser.dev/glibc/glibc/sysdeps/unix/sysv/linux/...