Re: about select ( synchronous I/O multiplexing)

From: Måns Rullgård (mru_at_inprovide.com)
Date: 04/26/05


Date: Tue, 26 Apr 2005 15:53:16 +0200

Grant Edwards <grante@visi.com> writes:

> On 2005-04-26, Jean-Baptiste <merci@pasdespam.fr> wrote:
>
>> What can be a file descriptor?
>
> Anything returned by open() or socket() for popen() or any

popen() doesn't return a file descriptor directly. Were you by chance
thinking of pipe()? socketpair() also returns file descriptors.

-- 
Måns Rullgård
mru@inprovide.com


Relevant Pages

  • Re: close(2) while accept(2) is blocked
    ... That means that in the case of a socket soclose is not ... It would be possible to keep track of the file descriptor number but I ... connection from a different socket created later. ... For a non-blocking socket the error is ...
    (freebsd-net)
  • Re: close(2) while accept(2) is blocked
    ... That means that in the case of a socket soclose is not ... It would be possible to keep track of the file descriptor number but I ... connection from a different socket created later. ... For a non-blocking socket the error is ...
    (freebsd-hackers)
  • Re: given an fd, how to tell if its open?
    ... Your process may inherit open fd's from a parent ... like a socket. ... start any new Applix sessions - disastrous with over 400 users over ... up on a consistent file descriptor. ...
    (comp.unix.programmer)
  • Re: send file descriptor via ipc
    ... numbers into 'struct file' references. ... buffer for the remote socket. ... them into the file descriptor array of the receiving process. ... descriptors that are referenced only by disconnected UNIX domain sockets ...
    (freebsd-hackers)
  • Re: Proposal: a revoke() system call
    ... You could achieve something of the same end by opening /dev/null and then dup2'ing to the file descriptor you want to revoke, ... Right now there's a known issue that calling closeon a socket from one thread doesn't interrupt a socket in a blocking I/O call from another thread -- you first have to call shutdown, ... Another example of a "reader thread" would be ... the main thread of a daemon that accepts the incoming connections ...
    (freebsd-arch)