Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:53579 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 8320 invoked from network); 25 Jun 2011 05:19:11 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 25 Jun 2011 05:19:11 -0000 Authentication-Results: pb1.pair.com header.from=arraypad@gmail.com; sender-id=pass; domainkeys=bad Authentication-Results: pb1.pair.com smtp.mail=arraypad@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.220.170 as permitted sender) DomainKey-Status: bad X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: arraypad@gmail.com X-Host-Fingerprint: 209.85.220.170 mail-vx0-f170.google.com Received: from [209.85.220.170] ([209.85.220.170:40302] helo=mail-vx0-f170.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id A1/E1-16311-ECF650E4 for ; Sat, 25 Jun 2011 01:19:11 -0400 Received: by vxi39 with SMTP id 39so2843030vxi.29 for ; Fri, 24 Jun 2011 22:19:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:content-type; bh=o2ykNZxauK5/L+29Qej6i7NhhpNwJwy3f4SN+S4psRw=; b=Qal8M3CJ6+MchXMH2u37xZi5JMi7A5Wf+hxLXxbMX9Ah2oUd+zVcSzu/YJGPNX4t+9 qMWKenvt5F57c0NF8mT0anSbnos8gT+dFe4xsH/hhZlStNp8i4GRLDOD830SMgruxXiA 1ODsvD9k02EsEbHibtLhlxApC6nfWcU/hTaKU= 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; b=DPHLnABeGFTfQv3XcWmADIX06DuTzpkydNDi4nDfoIZyFemNWP+aedmQ4zRD4ZhxST WkxkGcvHwgyKYoyS2KnsFjQHD8V8sAqYr3DhNLvlTcm8iqWW7Wi5kSoDI7+q4KZzrlFC D4zsmGKqy2GudO/3bQA0KmMT6npL8J6OgmII4= MIME-Version: 1.0 Received: by 10.52.185.8 with SMTP id ey8mr5780874vdc.68.1308979147359; Fri, 24 Jun 2011 22:19:07 -0700 (PDT) Received: by 10.52.182.39 with HTTP; Fri, 24 Jun 2011 22:19:07 -0700 (PDT) In-Reply-To: References: Date: Sat, 25 Jun 2011 06:19:07 +0100 Message-ID: To: internals@lists.php.net Content-Type: text/plain; charset=ISO-8859-1 Subject: Re: [PHP-DEV] [RFC] Object oriented session handlers From: arraypad@gmail.com (Arpad Ray) On Sat, Jun 25, 2011 at 6:13 AM, Arpad Ray wrote: > The most significant change is that the shutdown function registers > another shutdown function when it's called, to (almost) ensure that > it's always the last one, and therefore user shutdown functions should > always find the session available as expected. I'd especially > appreciate feedback or improvements on this because it feels very > hacky. One option is to add a separate hash of internal shutdown > functions which run after the user shutdown functions, another is to > add an element to the module entry, a la RSHUTDOWN, which gets run in > between steps 1 and 2 in the shutdown process (see main.c:1632). > To clarify the "almost" - it's still possible for a user shutdown function registered after session_set_save_handler() is called, to register another shutdown function, which would be run after the 2nd session shutdown function. This is one reason why I prefer the other methods, but it's a pretty small risk. Regards, Arpad