Top "File-descriptor" questions

Generally, a file descriptor is an index for an entry in a kernel-resident data structure containing the details of all open files.

C: how to redirect stderr from System-command to stdout or file?

The shell command $ avrdude -c usbtiny outputs text to stderr. I cannot read it with commmands such as head-less-more cos …

c stdout stderr file-descriptor
Socket and file descriptors

I'm learning about network programming in Unix and currently trying to understand the concept of socket and file descriptors. From …

sockets file-descriptor
What does the FD column of pipes listed by lsof mean?

I'm using the following command to get a list of pipes: lsof | grep PIPE I want to know what the …

linux shell command file-descriptor lsof
Why FD_SET/FD_ZERO for select() inside of loop?

I am using the select function for communication between my sockets. I have a while loop and I do - …

c++ select tcp file-descriptor
Is HANDLE similar to file descriptor in Linux?

Is HANDLE similar to file descriptor in Linux? As far as I know, HANDLE is used for handling every resources …

c++ windows file-descriptor
Getting the highest allocated file descriptor

Is there a portable way (POSIX) to get the highest allocated file descriptor number for the current process? I know …

posix file-descriptor
two file descriptors to same file

Using the posix read() write() linux calls, is it guaranteed that if I write through one file descriptor and read …

linux file posix file-descriptor
is it a good practice to close file descriptors on exit

If for some reason, I discover a fatal situation in my program, and I would like to exit with an …

c coding-style file-descriptor
ftell on a file descriptor?

Is there a way to do what ftell() does (return the current position in the file) on a raw file …

linux file-descriptor ftell file-pointer
What does dup2() do in C

I looked it up in the man page but I still don't get it... let's say you have dup2(f1,0). …

c pipe file-descriptor dup2