Thanks for the reply. The same log.exe works well in accepting inputs in, e.g., "dir | log", so I don't see why it would fail when launched by httpd. As far as I know, httpd on windows is multi-threaded, meaning there is only one child that creates all the threads to handle requests. (There should be another parent child, which doesn't create threads.) So are you saying that each thread launched its own log.exe process? Doesn't sound right to me... Please correct me if I'm wrong. Thanks. Debin -----Original Message----- From: William A. Rowe, Jr. [mailto:wrowe@xxxxxxxxxxxxx] Sent: Friday, May 19, 2006 5:24 PM To: users@xxxxxxxxxxxxxxxx Subject: Re: [users@httpd] piped log on Windows 2003 doesn't work Have you enabled some exception handling that would bypass exceptions on cin? cin should be closed on the write end of the pipe, before or as the parent process exits. The only way this would fail is if somehow the write end of the pipe is inhereted by the child process. Launching your program 5x isn't a bug, depending on your config. Both the parent process and child process will launch during startup. That behavior is unique to windows because child isn't forked. Bill DEBIN GAO wrote: > Hi, > > I'm trying to use the piped log on Windows 2003 (apache httpd 2.2), but > it doesn't work. I tried it out on linux and it works great. My > log.exe program is called 5 times when server starts, and were not > killed after server stops. And my log.exe program doesn't seem to > capture the logs. My log.exe is as simple as this: > > while (cin) { > cin.getline(buf, MAX_BUF_SIZE); > if (!cin) { > break; > } else { > fprintf(file, "%s\n", buf); > fflush(file); > } > } > > Can anyone help? Thanks. > > > > --------------------------------------------------------------------- > The official User-To-User support forum of the Apache HTTP Server Project. > See <URL:http://httpd.apache.org/userslist.html> for more info. > To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx > " from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx > For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx > > > . > --------------------------------------------------------------------- The official User-To-User support forum of the Apache HTTP Server Project. See <URL:http://httpd.apache.org/userslist.html> for more info. To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx " from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx --------------------------------------------------------------------- The official User-To-User support forum of the Apache HTTP Server Project. See <URL:http://httpd.apache.org/userslist.html> for more info. To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx " from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx