Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:34828 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 46783 invoked by uid 1010); 18 Jan 2008 07:46:29 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 46768 invoked from network); 18 Jan 2008 07:46:29 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 18 Jan 2008 07:46:29 -0000 Authentication-Results: pb1.pair.com smtp.mail=ioplex@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=ioplex@gmail.com; sender-id=pass; domainkeys=bad Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.146.181 as permitted sender) DomainKey-Status: bad X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: ioplex@gmail.com X-Host-Fingerprint: 209.85.146.181 wa-out-1112.google.com Received: from [209.85.146.181] ([209.85.146.181:64062] helo=wa-out-1112.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 93/63-18592-45950974 for ; Fri, 18 Jan 2008 02:46:29 -0500 Received: by wa-out-1112.google.com with SMTP id l24so1764645waf.17 for ; Thu, 17 Jan 2008 23:46:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; bh=yhAY4TFh+IwxeSzS5R2F7b3sux4r2v5ePQkFg2o3KMQ=; b=ojEgVFGXlvcW1C3vgQ71tmfPqIDXoeS5RgikbXy5fw7fNU/RfYrcc4QeYfVD4jOvhMHD7UhGPmlstFcnKZrqyHFypw4oWUyCo/7Iyyptl2Vx48+6nYIV14aMHUCtGpIj22TR8ISY+wsH2GTvLQXxrswXaHXWh3uFgxkXWutzXJg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=Adv5OctEEXTgQ6h4cRmAoNGbMdDtCGOXj0pYdp7PiHElmZLstMPaadzij6dUV+nmUYYNSJ7LSF7OaIKH/faLa792MWvkZW9PRmmHcCZukbbOt6RGE4WaogGx8JoRLKRTNFEhUWE51EenYr+kwXeN2X9rlOCXXimfL0FcfhucEqQ= Received: by 10.143.1.2 with SMTP id d2mr1778905wfi.91.1200642385402; Thu, 17 Jan 2008 23:46:25 -0800 (PST) Received: by 10.142.133.21 with HTTP; Thu, 17 Jan 2008 23:46:25 -0800 (PST) Message-ID: <78c6bd860801172346tab2dd81p841511ee07d15a5e@mail.gmail.com> Date: Fri, 18 Jan 2008 02:46:25 -0500 To: internals@lists.php.net MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Subject: Asymmetric Module Init / Deinit From: ioplex@gmail.com ("Michael B Allen") I have someone using my extension who is seeing some strange behavior where the module initializes which Apache starts, the extension works perfectly and then, without warning, after about 40 seconds, the deinitialization routine runs. This kills some state in a global context and everything goes very badly from there. Otherwise, Apache is still running just fine. The setup is Apache 2.2 / PHP 5.2 on Fedora 7. I personally have not been able to replicate this problem but I'm thinking it must be an Apache worker exiting that's triggering deinit. I know Apache 1.x has that behavior and I'm wondering if anyone knows if 2.2 exhibits that behavior. It's annoying because it means that the module initialization is called once whereas the deinitialization routine is called many times. Does this sound familiar to anyone? I would appreciate any insight as to how I can ensure that my module is deinitialized only once. My first thought is to simply save the pid of the process that initialized the module and check for it in the deinitialization routine. Mike