Return-Path: Delivered-To: apmail-httpd-modules-dev-archive@locus.apache.org Received: (qmail 9229 invoked from network); 17 Jul 2007 13:30:50 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 17 Jul 2007 13:30:50 -0000 Received: (qmail 20030 invoked by uid 500); 17 Jul 2007 13:30:51 -0000 Delivered-To: apmail-httpd-modules-dev-archive@httpd.apache.org Received: (qmail 20002 invoked by uid 500); 17 Jul 2007 13:30:51 -0000 Mailing-List: contact modules-dev-help@httpd.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: modules-dev@httpd.apache.org Delivered-To: mailing list modules-dev@httpd.apache.org Received: (qmail 19992 invoked by uid 99); 17 Jul 2007 13:30:51 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 17 Jul 2007 06:30:51 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: domain of cesarbs@gmail.com designates 64.233.184.238 as permitted sender) Received: from [64.233.184.238] (HELO wr-out-0506.google.com) (64.233.184.238) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 17 Jul 2007 06:30:47 -0700 Received: by wr-out-0506.google.com with SMTP id 55so819405wri for ; Tue, 17 Jul 2007 06:30:26 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=C3opWEAGbTu4suXL0yNNBGABiqWgeD7e5l4x2Ca4c/STvWYpjd3XL9q8HN7bhyD+erhqLmfyZboh5H1CjvbDtAkvm85EvdSjBWI76O83MpouMA/YOcdTCEk+MRWSFe5piAgJFtJs6renIOpaW6f3HU4B+iefL0pxW6nN+Zkl7a4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=W6LGiQwQ/bL6Wqq68ItDZBEOh1DeQ7FWJGs8Gmo0mqcNHxkwPzA91aqXDwKcdpFxT3WohTZ2C+R6yRUm/j1+sju0Orh8cr7jDo2gKi/mPGi6WuLs7M6xDF2tgbZ/bFTlKznkHTjnI6UIxrhF1PFWu/NV0PAFobgbVEsZWg9QZbA= Received: by 10.100.194.7 with SMTP id r7mr188763anf.1184679026110; Tue, 17 Jul 2007 06:30:26 -0700 (PDT) Received: by 10.100.8.11 with HTTP; Tue, 17 Jul 2007 06:30:26 -0700 (PDT) Message-ID: Date: Tue, 17 Jul 2007 10:30:26 -0300 From: "=?ISO-8859-1?Q?C=E9sar_Leonardo_Blum_Silveira?=" To: modules-dev@httpd.apache.org Subject: Restart order MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable Content-Disposition: inline X-Virus-Checked: Checked by ClamAV on apache.org Hello, I have a module which needs some information to persist across restarts. In order to achieve that, I have registered a cleanup function which stores the information on a DBM, and when the module is restarted, the post_config function checks for the presence of that DBM and, in case it is present, it restores the data. However, that doesn't seem to always work. Sometimes the information does not persist. I took a look at the error_log and noticed that the messages were in the following order: - Parent creates child - A restart occurs, child is told to "die" - The new child process is created - The old child exits I belive that when the child exits the cleanup is executed. Thus, the new child process (which is started before the old child exists) does not see the DBM (because it doesn't exist yet). Is that correct? If so, it means I cannot rely on the assumption that the cleanup will be executed before the new child process is created, right? By the way, this is being tested on Windows. That's why I'm speaking of only one child process. Hre is the error_log: [Mon Jul 16 16:10:49 2007] [notice] Parent: Created child process 4828 [Mon Jul 16 16:10:51 2007] [notice] Child 4828: Child process is running [Mon Jul 16 16:10:51 2007] [notice] Child 4828: Acquired the start mutex. [Mon Jul 16 16:10:51 2007] [notice] Child 4828: Starting 250 worker threads= . [Mon Jul 16 16:11:09 2007] [notice] Parent: Received restart signal -- Restarting the server. [Mon Jul 16 16:11:09 2007] [notice] Child 4828: Exit event signaled. Child process is ending. [Mon Jul 16 16:11:10 2007] [notice] Child 4828: Released the start mutex [Mon Jul 16 16:11:11 2007] [notice] Parent: Created child process 3988 [Mon Jul 16 16:11:13 2007] [notice] Child 3988: Child process is running [Mon Jul 16 16:11:13 2007] [notice] Child 3988: Acquired the start mutex. [Mon Jul 16 16:11:13 2007] [notice] Child 3988: Starting 250 worker threads= . [Mon Jul 16 16:11:13 2007] [notice] Child 4828: Waiting for 250 worker threads to exit. [Mon Jul 16 16:11:13 2007] [notice] Child 4828: All worker threads have exi= ted. [Mon Jul 16 16:11:13 2007] [notice] Child 4828: Child process is exiting Thank you, --=20 C=E9sar L. B. Silveira http://cesarbs.wordpress.com/