Return-Path: list-help: list-unsubscribe: List-Post: List-Id: Mailing-List: contact bugs-help@apr.apache.org; run by ezmlm Delivered-To: mailing list bugs@apr.apache.org Received: (qmail 84221 invoked by uid 99); 1 Oct 2006 23:19:54 -0000 Received: from idunn.apache.osuosl.org (HELO idunn.apache.osuosl.org) (140.211.166.84) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 01 Oct 2006 16:19:54 -0700 X-ASF-Spam-Status: No, hits=-9.4 required=5.0 tests=ALL_TRUSTED,NO_REAL_NAME Received: from [209.237.227.198] ([209.237.227.198:37463] helo=brutus.apache.org) by idunn.apache.osuosl.org (ecelerity 2.1.1.8 r(12930)) with ESMTP id 2A/B9-05102-A1D40254 for ; Sun, 01 Oct 2006 16:19:54 -0700 Received: by brutus.apache.org (Postfix, from userid 33) id CA4C37142E1; Sun, 1 Oct 2006 16:19:47 -0700 (PDT) From: bugzilla@apache.org To: bugs@apr.apache.org Subject: DO NOT REPLY [Bug 40651] - SHELL_PATH in apr_arch_threadproc.h hangs Apache piped logger In-Reply-To: X-Bugzilla-Reason: AssignedTo Message-Id: <20061001231947.CA4C37142E1@brutus.apache.org> Date: Sun, 1 Oct 2006 16:19:47 -0700 (PDT) DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG� RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT . ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND� INSERTED IN THE BUG DATABASE. http://issues.apache.org/bugzilla/show_bug.cgi?id=40651 ------- Additional Comments From rpluem@apache.org 2006-10-01 16:19 ------- Hi Rainer, many thanks for the quick feedback. I think I know why this problem only happens to the main error logrotater: httpd closes the writing side of the pipe to the logrotater. This auses the logrotater to exit and thus /bin/sh -c to exit. There is no need to send a SIGTERM to either /bin/sh -c or logrotate in this case. This does not work this way with the main error logrotater since the writing side fd has been previously copied (dup2ed) to stderr. After a start of the new main error log logrotater its wrting side should be dup2ed again to stderr. This should cause the old stderr file descriptor to be closed and thus causing the logrotator to exit as this is the last open writing side of the pipe. This does not seem to work on Solaris (libc on Solaris seems to do a fcntl(13, F_DUP2FD, 0x00000002) instead of dup2(13,2)). I did not have the time to do further tests on this issue. As you may notice the logrotater dies after the main httpd process has died as the OS does now seem to close the file descriptor correctly. Since I personally do not use logrotation on the main error log file for years (and this works perfectly if you do everything else in virtual hosts and nothing in the main server) I am not quite sure anymore, but I think I stopped logrotating the main error log file because log messages did not arrive there during restart / graceful restart. Nevertheless it makes still sense to me to stop hardcoding /bin/sh in APR. Additionally to be able to set SHELL_PATH via configure it might be even better if you can set the shell path via some APR function and APR only uses SHELL_PATH if nothing was set. -- Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee.