bug-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Socket operation on a non-socket


From: Warren Jones
Subject: Socket operation on a non-socket
Date: 30 Apr 2003 16:04:42 -0700

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 address@hidden 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


reply via email to

[Prev in Thread] Current Thread [Next in Thread]