[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: CVS 1.11.18 - Windows Bug - cannot write to stdout
From: |
Mark D. Baushke |
Subject: |
Re: CVS 1.11.18 - Windows Bug - cannot write to stdout |
Date: |
Wed, 17 Nov 2004 16:31:14 -0800 |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi Conrad,
Conrad T. Pino <Conrad@pino.com> writes:
> I received a request for latest stable Windows binary
> and found anomaly show below my signature block.
Ouch.
> I think we had this problem on feature and fixed it.
> What's the story on stable branch?
This problem didn't get fixed on stable.
> Should I post the binary as it is?
Probably not. :-(
I have committed the following patch to the stable branch to fix the
problem.
-- Mark
2004-11-17 Mark D. Baushke <mdb@cvshome.org>
* client.c (handle_m, handle_e): Winsock is returning
SOCK_ERRNO == WSAENOTSOCK for select() problems and not
setting errno. Do not bother with printing an error from a
select() that is not returning an non-zero errno.
(Report from Conrad T. Pino <Conrad@Pino.com>.)
Index: src/client.c
===================================================================
RCS file: /cvs/ccvs/src/client.c,v
retrieving revision 1.318.4.23
diff -u -p -r1.318.4.23 client.c
--- src/client.c 26 Oct 2004 19:01:38 -0000 1.318.4.23
+++ src/client.c 18 Nov 2004 00:25:57 -0000
@@ -3087,8 +3087,9 @@ handle_m (args, len)
fflush (stderr);
FD_ZERO (&wfds);
FD_SET (STDOUT_FILENO, &wfds);
+ errno = 0;
s = select (STDOUT_FILENO+1, NULL, &wfds, NULL, NULL);
- if (s < 1)
+ if (s < 1 && errno != 0)
perror ("cannot write to stdout");
fwrite (args, len, sizeof (*args), stdout);
putc ('\n', stdout);
@@ -3145,6 +3146,7 @@ handle_e (args, len)
fflush (stdout);
FD_ZERO (&wfds);
FD_SET (STDERR_FILENO, &wfds);
+ errno = 0;
s = select (STDERR_FILENO+1, NULL, &wfds, NULL, NULL);
/*
* If stderr has problems, then adding a call to
@@ -3152,7 +3154,7 @@ handle_e (args, len)
* will not work. So, try to write a message on stdout and
* terminate cvs.
*/
- if (s < 1)
+ if (s < 1 && errno != 0)
fperrmsg (stdout, 1, errno, "cannot write to stderr");
fwrite (args, len, sizeof (*args), stderr);
putc ('\n', stderr);
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (FreeBSD)
iD8DBQFBm+1S3x41pRYZE/gRAs8vAJ94J5+7dhneMibIp2KoGHUYBOxyjwCeM8Gt
rlb6YYkx6n7ctzK3u1LhPv4=
=CMzU
-----END PGP SIGNATURE-----
- CVS 1.11.18 - Windows Bug - cannot write to stdout, Conrad T. Pino, 2004/11/17
- Re: CVS 1.11.18 - Windows Bug - cannot write to stdout,
Mark D. Baushke <=
- RE: CVS 1.11.18 - Windows Bug - cannot write to stdout, Conrad T. Pino, 2004/11/17
- Re: CVS 1.11.18 - Windows Bug - cannot write to stdout, Mark D. Baushke, 2004/11/17
- Re: CVS 1.11.18 - Windows Bug - cannot write to stdout, Derek Robert Price, 2004/11/18
- Re: CVS 1.11.18 - Windows Bug - cannot write to stdout, Mark D. Baushke, 2004/11/18
- RE: CVS 1.11.18 - Windows Bug - cannot write to stdout, Conrad T. Pino, 2004/11/18
- Re: CVS 1.11.18 - Windows Bug - cannot write to stdout, Derek Robert Price, 2004/11/18
- RE: CVS 1.11.18 - Windows Bug - cannot write to stout, Conrad T. Pino, 2004/11/20
- Re: CVS 1.11.18 - Windows Bug - cannot write to stout, Derek Robert Price, 2004/11/20