--------------------- PatchSet 883 Date: 2003/08/17 13:01:44 Author: serassio Branch: nt Tag: (none) Log: Fixed a win32 dup2() problem Members: src/comm.cc:1.19.2.16->1.19.2.17 Index: squid3/src/comm.cc =================================================================== RCS file: /cvsroot/squid-sf//squid3/src/comm.cc,v retrieving revision 1.19.2.16 retrieving revision 1.19.2.17 diff -u -r1.19.2.16 -r1.19.2.17 --- squid3/src/comm.cc 17 Aug 2003 12:39:09 -0000 1.19.2.16 +++ squid3/src/comm.cc 17 Aug 2003 13:01:44 -0000 1.19.2.17 @@ -1,6 +1,6 @@ /* - * $Id: comm.cc,v 1.19.2.16 2003/08/17 12:39:09 serassio Exp $ + * $Id: comm.cc,v 1.19.2.17 2003/08/17 13:01:44 serassio Exp $ * * DEBUG: section 5 Socket Functions * AUTHOR: Harvest Derived @@ -1407,6 +1407,13 @@ return 0; } +#ifdef _SQUID_MSWIN_ + + /* On Windows dup2() can't work correctly on Sockets, the */ + /* workaround is to close the destination Socket before call them. */ + close(cs->fd); +#endif + if (dup2(fd2, cs->fd) < 0) { debug(5, 0) ("commResetFD: dup2: %s\n", xstrerror());