Return-Path: Delivered-To: apmail-httpd-dev-archive@www.apache.org Received: (qmail 55419 invoked from network); 22 Jan 2010 19:34:04 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 22 Jan 2010 19:34:04 -0000 Received: (qmail 78081 invoked by uid 500); 22 Jan 2010 19:34:03 -0000 Delivered-To: apmail-httpd-dev-archive@httpd.apache.org Received: (qmail 78011 invoked by uid 500); 22 Jan 2010 19:34:03 -0000 Mailing-List: contact dev-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: dev@httpd.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list dev@httpd.apache.org Received: (qmail 78002 invoked by uid 99); 22 Jan 2010 19:34:03 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 22 Jan 2010 19:34:03 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of trawick@gmail.com designates 209.85.211.198 as permitted sender) Received: from [209.85.211.198] (HELO mail-yw0-f198.google.com) (209.85.211.198) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 22 Jan 2010 19:33:55 +0000 Received: by ywh36 with SMTP id 36so1117669ywh.15 for ; Fri, 22 Jan 2010 11:33:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=kHB758XCfel7VG7OjQR2c0Y38Ax20EBW2Sd9XMVA040=; b=Xo8iFHfTCPu/8JkER4tG9JWKUvzSIfZr+g8Wf3xg0rs90VrwEnRAXeInhl0QPodzBq GTVDXHYL7dLz/pjlXpQKkMcmqvFI4r4GhyLEepGKRXR179w2mxcZ4rvSUwLIbGD+43JQ W/NSyIyBRWzgSEdWnCaCCvtjhvdODSgvwIowk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=K+lC/ysKlL+56x0P3SsgDwD6cgQhEmeEzsoDVnMzYxYk3tc6L0Dr0DhkZ3rswYIeyJ +qeEVcuw/6W3w0XWQL+WMaZ7GmJ5RyVZDKC8tEKALx+reTb1TAVX0Ia5I+V+iIU5+KWk XP+NLnFBXcSk6nHMIdacxPRSeyYiMiBp2O9m8= MIME-Version: 1.0 Received: by 10.101.182.11 with SMTP id j11mr4512016anp.163.1264188813377; Fri, 22 Jan 2010 11:33:33 -0800 (PST) In-Reply-To: <4B59F89A.6000107@aldan.algebra.com> References: <4B59F1D7.9060409@aldan.algebra.com> <4B59F89A.6000107@aldan.algebra.com> Date: Fri, 22 Jan 2010 14:33:33 -0500 Message-ID: Subject: Re: reopening of logs without restarting From: Jeff Trawick To: dev@httpd.apache.org Content-Type: text/plain; charset=KOI8-R Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org 2010/1/22 Mikhail T. : > 22.01.2010 14:03, Jeff Trawick =CE=C1=D0=C9=D3=C1=D7(=CC=C1): >>> >>> > =9ACurrently there are ap_run_open_logs and worker_open_logs. Can my >>> > =9Ahypothetical signal-handler simply go through the list of opened >>> > =9Adescriptors, set them to new values and close the old? >>> >> >> You'd need to do that in every child process, without interfering with >> current log file use. >> > > Yes, of course -- I'll open up a new file descriptor (or FILE* ?) first, = and > then assign the new value to the field in the relevant structure -- up un= til > that assignment, the current log-file use will continue using the earlier > descriptor. > > Is not worker_open_logs() running in every child process? no the "worker" in that name just means that it is the open_logs hook for the worker MPM; the open_logs hook runs only in the parent (in fact worker_open_logs() doesn't open any logs file; it uses that hook to open listening sockets)