lkml.org 
[lkml]   [2000]   [Feb]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: accept() improvements for rt signals
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/

\
 
 \ /
  Last update: 2005-03-22 13:56    [W:0.095 / U:0.164 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site