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.

File descriptor leak example?

Is there any good example do demonstrate file descriptor leak in Android? I read somewhere that it occurs if we …

java android memory-leaks file-descriptor memory-leak-detector
FIFO pipe is always readable in select()

In C pseudo-code: while (1) { fifo = open("fifo", O_RDONLY | O_NONBLOCK); fd_set read; FD_SET(fifo, &read); select(…

c select file-descriptor fifo
How does socket select() work?

As described in network programming books, select() monitors a set of file descriptors for reading. For example, here is part …

c sockets file-descriptor
PhantomJS: exported PDF to stdout

Is there a way to trigger the PDF export feature in PhantomJS without specifying an output file with the .pdf …

pdf pipe file-descriptor phantomjs io-redirection
C read and thread safety (linux)

What would happen if you call read (or write, or both) in two different thread, on the same file descriptor (…

c linux multithreading file-descriptor
redirect stdout/stderr to file under unix c++ - again

What I want to do redirect stdout and stderr to one or more files from inside c++ Why I need …

c++ c io file-descriptor io-redirection
Is O_LARGEFILE needed just to write a large file?

Is the O_LARGEFILE flag needed if all that I want to do is write a large file (O_WRONLY) …

c large-files file-descriptor posix-api large-file-support
Difference between fclose and close

If I fopen a file, what's the difference between calling fclose or close and which one should I use? If …

c file posix file-descriptor
Are STDIN_FILENO and STDOUT_FILENO read only in c?

fd = open("/dev/null", O_RDWR); if (fd == -1) { ngx_log_error(NGX_LOG_EMERG, log, ngx_errno, "open(\"/dev/…

c unix file-descriptor dup2
How can I pass a socket from parent to child processes

I'm stuck on a problem in a C program on Linux. I know that when a processes is forked the …

c sockets webserver fork file-descriptor