Re: SO_KEEPALIVE - a solution for where X servers are shut down?
Alan Coopersmith <[email protected]>
| Newsgroups | gmane.comp.xfree86.devel |
|---|---|
| Message-ID | <[email protected]> |
SO_KEEPALIVE is already set for X sockets in the Xtrans library code that creates all sockets in X. (See xc/lib/xtrans/Xtranssock.c) -Alan Coopersmith- [email protected] Sun Microsystems, Inc. - X Window System Engineering Nick Hill wrote: > The problem: > When running X programs to a remote X server, if the remote X server > stops being available, the programs which were being displayed often > stay running. This results in many stale programs running and using > resources. > > It appears that by default, xlibs opens TCP sockets to remote X servers > without setting SO_KEEPALIVE. > > If SO_KEEPALIVE is set, the kernel will send periodic pings through the > TCP connection. If the other end fails to respond for some time, the TCP > socket is closed. > > If the TCP socket is closed by the kernel, will X apps also close, > thereby freeing redundant resources? > > If this would work, can anyone consider a reason not to enable > SO_KEEPALIVE? > > Are there run-time options for SO_KEEPALIVE or will the option need to > be set at source level or compile time? > > If editing source code is required, is there one function responsible > for opening all X TCP sockets, or would it be a complex task to edit > Xlibs to enable SO_KEEPALIVE? > > _______________________________________________ > Devel mailing list > [email protected] > http://XFree86.Org/mailman/listinfo/devel