2 points | by speckx 6 hours ago
1 comments
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.h...
2. https://codebrowser.dev/glibc/glibc/sysdeps/unix/sysv/linux/...
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.h...
2. https://codebrowser.dev/glibc/glibc/sysdeps/unix/sysv/linux/...