Re: accept() improvements for rt signals

From: Dean Gaudet (dgaudet-list-linux-kernel@arctic.org)
Date: Mon Feb 21 2000 - 14:33:03 EST


On Mon, 21 Feb 2000, Dan Kegel wrote:

> * the new socket to inherit the F_SETSIG settings of the old
> one (works for some cases, but makes some server designs hard)
> or
> * an atomic accept-and-F_SETSIG,FASYNC,F_SETOWN call (works for
> all server designs I know of)

there's also the need to turn on non-blocking i/o, to enable
close-on-exec, and to disable nagle (or set the cork). but collapsing
syscalls is kind of a bad thing to do.

what if there were:

    accept2(int s_listen, struct sockaddr *, int *addrlen, int s_client);

where s_client is a socket created by socket() with its options all set up
as desired by the application? that way the app can do the F_SETSIG/etc.
before it is attached to the network.

hmm, would it be possible to reuse the socket on the other end -- after
the app does a shutdown() for both directions? that could be interesting.

Dean

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Wed Feb 23 2000 - 21:00:28 EST