Socket operation on a non-socket

[email protected] (Warren Jones)
Newsgroups gmane.comp.version-control.cvs.bugs
Organization Fluke Corporation, Everett, WA
Message-ID <[email protected]>
When I built CVS 1.11.5 for Windows, I found that the output
of every CVS command was followed by this message:

    reading from [myserver]: Socket operation on a non-socket

CVS works properly with the exception of this warning, which
seems to be harmless.  This problem was reported in gnu.cvs.bug
by [email protected] on March 5.  He suggested commenting
out the definition of SHUTDOWN_SERVER in windows-NT/config.h.
My workaround was somewhat different.  (See patch below.)
Neither workaround gets at the real problem, which is that
SHUTDOWN_SERVER closes the socket for both input and output
at the same time.  Comments in client.c point toward a better
solution:

    /* FIXME:  Should have a SHUTDOWN_SERVER_INPUT &
     * SHUTDOWN_SERVER_OUTPUT
     */

Here's my patch:

Index: client.c
===================================================================
RCS file: /usr0/sweng/src/active/CVS.repo/cvs/src/client.c,v
retrieving revision 1.1.1.9
diff -u -r1.1.1.9 client.c
--- client.c	21 Jan 2003 22:33:59 -0000	1.1.1.9
+++ client.c	30 Apr 2003 22:42:38 -0000
@@ -794,8 +794,10 @@
 	if (! buf_empty_p (buf)
 	    || (err = recv (n->socket, &tmp, 1, 0)) > 0)
 	    error (0, 0, "dying gasps from %s unexpected", current_parsed_root->hostname);
+# ifndef SHUTDOWN_SERVER
 	else if (err == -1)
 	    error (0, 0, "reading from %s: %s", current_parsed_root->hostname, SOCK_STRERROR (SOCK_ERRNO));
+# endif
 
 	/* shutdown() socket */
 # ifdef SHUTDOWN_SERVER

--------------------------------------------------------------------
Warren Jones              | To keep every cog and wheel is the first
Fluke Corporation         | precaution of intelligent tinkering.
Everett, Washington, USA  |                          -- Aldo Leopold
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.