bug-cvs
[Top][All Lists]
Advanced

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

Re: cvs 1.11.2 buffer.c blocking socket/pipe w/bugfix


From: Derek Robert Price
Subject: Re: cvs 1.11.2 buffer.c blocking socket/pipe w/bugfix
Date: Tue, 24 Sep 2002 21:43:24 -0400
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.1) Gecko/20020823 Netscape/7.0

The socket or pipe really needs to be verified closed there to report errors properly. Can the pipe or socket be set to O_NONBLOCK just before this call or could some other read call be used that won't block?

Derek
--
               *8^)

Email: address@hidden

Get CVS support at http://ximbiot.com
--
All work and no play makes Bart a dull boy.
All work and no play makes Bart a dull boy.
All work and no play makes Bart a dull boy...

         - Bart Simpson on chalkboard, _The Simpsons_


Mark D. Baushke wrote:

Hi Derek,

I suspect this patch needs to get into current cvs sources. (It is in the FreeBSD top-of-tree sources already.)

I can file this as a bug report if you wish...

        Thanks,
        -- Mark
        address@hidden

FreeBSD Log:
----------------------------
date: 2002/09/02 07:58:04;  author: peter;  state: Exp;  lines: +627 -17
Fix a cvs server bug introduced in 1.11.2, in the words of the author:
---
Fix communication hanging in communication shutdown phase, caused by at
least older CVS clients (version < 1.11.2) and a semantically incorrect
usage of getc() by the server.
---

getc() was being used on a blocking socket/pipe.

Submitted by:   rse
----------------------------

Index:src/buffer.c
===================================================================
RCS file: /cvs/ccvs/src/buffer.c,v
retrieving revision 1.19
diff -u -p -r1.19 buffer.c
--- buffer.c    20 May 2002 18:27:55 -0000      1.19
+++ buffer.c    24 Sep 2002 06:54:01 -0000
@@ -1392,8 +1392,7 @@ stdio_buffer_shutdown (buf)

    if (buf->input)
    {
-       if (! buf_empty_p (buf)
-           || getc (bc->fp) != EOF)
+       if (! buf_empty_p (buf))
        {
# ifdef SERVER_SUPPORT
            if (server_active)






reply via email to

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