Derek Robert Price <derek@ximbiot.com> writes:
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?
Hmmm.. I have not tested it, but I suppose !feof(bc->fp) might work on
some platforms.
I am CCing Peter Wemm on this message as he likely has more information.
Hi Peter, there is a patch you made to the FreeBSD version of cvs 1.11.2
that I think should probably go back to the cvshome.org folks. Can you
point to the test case that you used to determine the code was hanging
using older cvs clients?
Thanks,
-- Mark
PS: I am slowly working thru the FreeBSD changes to cvs 1.11.2 in hopes
of getting the more critical patches folded back into the cvshome.org
version.
Derek
--
*8^)
Email: derek@ximbiot.com
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
mdb@cvshome.org
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)