Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:39374 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 99895 invoked from network); 27 Jul 2008 13:53:15 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 27 Jul 2008 13:53:15 -0000 Authentication-Results: pb1.pair.com header.from=arnaud.lb@gmail.com; sender-id=pass; domainkeys=bad Authentication-Results: pb1.pair.com smtp.mail=arnaud.lb@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.128.190 as permitted sender) DomainKey-Status: bad X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: arnaud.lb@gmail.com X-Host-Fingerprint: 209.85.128.190 fk-out-0910.google.com Received: from [209.85.128.190] ([209.85.128.190:43573] helo=fk-out-0910.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 05/C4-02589-9CD7C884 for ; Sun, 27 Jul 2008 09:53:13 -0400 Received: by fk-out-0910.google.com with SMTP id 18so3004751fks.7 for ; Sun, 27 Jul 2008 06:53:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:subject:date :user-agent:mime-version:content-type:content-transfer-encoding :content-disposition:message-id; bh=ZTSR9eu4emFg+49pG4MBN+L5SuL94ib+vMtltsGsmqk=; b=IW9XKqSzei+xhmzXXl12KTx0CYk49NM8NBJKY+PIxL0cJLbLAXg6mt6Oon4dmdb9QZ ExgnnbMutjNouEkBWCBr5WelIqzk5yEu+mhpG3icLWJ5V+Vt1nAZyMdheK2Ld1PP/TlF LgdmNRjcQUd9nyovQyqfYk9El1NsWf84oDIdE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:subject:date:user-agent:mime-version:content-type :content-transfer-encoding:content-disposition:message-id; b=p2uQm1a5sI1j2uqMpHzDhkte/KZ97+SO8arKpzz+sAvlH03NISyMPfHskO2pg2bMTJ M4RXo7/Q2KK6XZKVMIo4BiYE/5rFLeBnGD89b1usCrlgZis47PbYqRGo8CuqYdubv2B5 +oSOLS2SH+F1LizwT1oaq6ou5kPw+BBYopKx4= Received: by 10.103.221.13 with SMTP id y13mr2332374muq.41.1217166790261; Sun, 27 Jul 2008 06:53:10 -0700 (PDT) Received: from 207-177-41-213.getmyip.com ( [213.41.177.207]) by mx.google.com with ESMTPS id y6sm81385732mug.15.2008.07.27.06.53.08 (version=SSLv3 cipher=RC4-MD5); Sun, 27 Jul 2008 06:53:09 -0700 (PDT) To: internals@lists.php.net Date: Sun, 27 Jul 2008 15:51:30 +0200 User-Agent: KMail/1.9.9 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-ID: <200807271551.30949.arnaud.lb@gmail.com> Subject: Replacement to ticks for signals From: arnaud.lb@gmail.com ("Arnaud Le Blanc") Hi, I made a pcntl_signal_dispatch() function [1] to allow scripts that use signals to work without ticks. This function just calls the pcntl's tick handler on-demand so that all signal handler functions are called if there are pending signals. It does not allow the signal handlers to be called at any time like with ticks, but allows things like this: while (do_something()) { /* main loop */ pcntl_signal_dispatch(); } or while (pcntl_signal_dispatch() && do_something()) { /* main loop */ } Can I commit this ? [1] http://arnaud.lb.s3.amazonaws.com/pcntl_signal_dispatch.patch Regards, Arnaud