Return-Path: X-Original-To: apmail-httpd-dev-archive@www.apache.org Delivered-To: apmail-httpd-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 5CEB69687 for ; Tue, 11 Oct 2011 14:29:56 +0000 (UTC) Received: (qmail 90625 invoked by uid 500); 11 Oct 2011 14:29:55 -0000 Delivered-To: apmail-httpd-dev-archive@httpd.apache.org Received: (qmail 90574 invoked by uid 500); 11 Oct 2011 14:29:55 -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 90566 invoked by uid 99); 11 Oct 2011 14:29:55 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 11 Oct 2011 14:29:55 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of covener@gmail.com designates 209.85.210.173 as permitted sender) Received: from [209.85.210.173] (HELO mail-iy0-f173.google.com) (209.85.210.173) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 11 Oct 2011 14:29:49 +0000 Received: by iakl21 with SMTP id l21so7893488iak.18 for ; Tue, 11 Oct 2011 07:29:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=ePMqigwV8/wZFLE++cMQXbGSafg4TO4oXEhvEoaTekc=; b=jhemnYJpdPZDKjJna0qeAEmIUhyBEeBNN0+KV4cjisFSNZPHe/EFQu4LtlWNUDpfO5 +XiaWUNLyytuz52OJ68l3OWuqmpjWZlLOSnF4nc5Bi/XuhlXzs8D6CMkxfT2OdzCrZPD 50upsYW3OsHuzmQu5XiPhWj54tbPZgk/uJuck= MIME-Version: 1.0 Received: by 10.42.132.10 with SMTP id b10mr26456053ict.18.1318343368428; Tue, 11 Oct 2011 07:29:28 -0700 (PDT) Received: by 10.42.179.199 with HTTP; Tue, 11 Oct 2011 07:29:28 -0700 (PDT) In-Reply-To: References: Date: Tue, 11 Oct 2011 10:29:28 -0400 Message-ID: Subject: Re: httpd should be able to reopen log files without a restart. From: Eric Covener To: dev@httpd.apache.org Content-Type: text/plain; charset=ISO-8859-1 On Mon, Oct 10, 2011 at 9:16 PM, crocket wrote: > When some softwares(including stunnel) receive SIGUSR1, they reopen a > log file without re-reading configuration files or restarting. > Since httpd uses SIGUSR1 for graceful restart, it could use SIGUSR2 > purely for reopening log files. > > Why do people need this signal? > > A graceful restart doesn't kill active children processes, and those > processes still write on an old log file. > logrotate can be configured to compress old log files, in which case > httpd would try to write onto a compressed log file. > Since httpd can't log to a file, it would show abnormal behaviors or > even abort downloads from httpd. Does logrotate use the same inode for the compressed file? Either way, why would httpd fail to write to the file and behave abnormally?