About 341,000 results
Open links in new tab
  1. What are file descriptors, explained in simple terms?

    Mar 10, 2011 · When we open an existing file or create a new file, the kernel returns a file descriptor to the process. The kernel maintains a table of all open file descriptors, which are in …

  2. bash - How do file descriptors work? - Stack Overflow

    This is ./fdtest: line 4: 3: Bad file descriptor ./fdtest: line 5: 4: Bad file descriptor But you can make descriptors 3 and 4 work, but number 1 fail by running:

  3. linux - File Descriptors and File Handles (and C) - Stack Overflow

    Nov 5, 2015 · File descriptor is a positive integer index of a process's exlusive file descriptor table. The items of the file descriptor table are references to a system-wide open file description table.

  4. What's the difference between a file descriptor and a file pointer?

    Mar 11, 2010 · A file descriptor is a low-level integer "handle" used to identify an opened file (or socket, or whatever) at the kernel level, in Linux and other Unix-like systems. You pass …

  5. c - What is file-descriptor? - Stack Overflow

    Nov 29, 2016 · In Unix/ Linux operating systems, a file descriptor is an abstract indicator (handle) used to access a file or other IO (input/output) resource, such as a pipe or network socket. …

  6. What is an open file description? - Unix & Linux Stack Exchange

    The file descriptor structure contains a pointer to an open file description. There can be multiple file descriptors pointing to the same open file description, from multiple processes, for example …

  7. What's so special about file descriptor 3 on linux?

    Aug 21, 2010 · The special aspect of file descriptor 3 is that it will usually be the first file descriptor returned from a system call that allocates a new file descriptor, given that 0, 1 and 2 are …

  8. linux - Retrieve filename from file descriptor in C - Stack Overflow

    Mar 19, 2019 · Is it possible to get the filename of a file descriptor (Linux) in C?

  9. Socket and file descriptors - Stack Overflow

    File descriptors are numbers that "point" (or index) records in a process' own file descriptor table (one table for each process). Each record in the table has two values -- the pointer to an open …

  10. c - How can I convert a file pointer ( FILE* fp ) to a file descriptor ...

    Jul 2, 2010 · I have a FILE *, returned by a call to fopen(). I need to get a file descriptor from it, to make calls like fsync(fd) on it. What's the function to get a file descriptor from a file pointer?