--------------------- PatchSet 2894 Date: 2006/04/25 14:15:57 Author: serassio Branch: nt Tag: (none) Log: Added stderr dump to log file during the Windows service startup Members: src/win32.cc:1.4.2.21->1.4.2.22 Index: squid3/src/win32.cc =================================================================== RCS file: /cvsroot/squid-sf//squid3/src/win32.cc,v retrieving revision 1.4.2.21 retrieving revision 1.4.2.22 diff -u -r1.4.2.21 -r1.4.2.22 --- squid3/src/win32.cc 29 Aug 2005 20:01:05 -0000 1.4.2.21 +++ squid3/src/win32.cc 25 Apr 2006 14:15:57 -0000 1.4.2.22 @@ -1,6 +1,6 @@ /* - * $Id: win32.cc,v 1.4.2.21 2005/08/29 20:01:05 serassio Exp $ + * $Id: win32.cc,v 1.4.2.22 2006/04/25 14:15:57 serassio Exp $ * * * * * * * * * Legal stuff * * * * * * * * @@ -886,8 +886,14 @@ {NULL, NULL} }; char *c; + char stderr_path[256]; if ((argc == 2) && strstr(argv[1], _WIN_SQUID_SERVICE_OPTION)) { + strcpy(stderr_path, argv[0]); + strcat(stderr_path,".log"); + freopen(stderr_path, "w", stderr); + setmode(fileno(stderr), O_TEXT); + WIN32_run_mode = _WIN_SQUID_RUN_MODE_SERVICE; opt_no_daemon = 1;