Give an example of how isatty(3) might return the wrong answer.
What will be an ideal response?
The isatty function is usually implemented as a non-destructive ioctl command, such as TCGETA,supported by all terminal devices. If another device driver that is not a terminal driver supports an ioctl command with the same number value as TCGETA,and if you open this device and pass the ?le descriptor toisatty, it will return true (nonzero) if the ioctl command succeeds.
Computer Science & Information Technology