mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 08:22:45 +00:00 
			
		
		
		
	
		
			
				
	
	
	
	
		
			547 B
		
	
	
	
	
	
	
	
			
		
		
	
	
			547 B
		
	
	
	
	
	
	
	
Name
isatty - check if a file descriptor is a TTY
Synopsis
#include <unistd.h>
int isatty(int fd);
Description
Checks if the device inside a given file descriptor is a TTY device.
Return value
If fd refers to a TTY device, returns 1. Otherwise, returns 0 and errno is set to describe the error.
Errors
- EBADF:- fdis not an open file descriptor.
- ENOTTY:- fdrefers to something that's not a TTY device.
- EINVAL:- fdrefers to something that supports- ioctl(), but is still not a TTY device.
