| ▲ | You Can Detect If Code Is Being Run Inside a Terminal(nelson.cloud) | |
| 2 points by speckx 5 hours ago | 1 comments | ||
| ▲ | MisterTea 4 hours ago | parent [-] | |
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/... | ||