Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:68153 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 12989 invoked from network); 18 Jul 2013 09:25:44 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 18 Jul 2013 09:25:44 -0000 Authentication-Results: pb1.pair.com smtp.mail=php-php-dev@m.gmane.org; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=fullmoon@newsguy.com; sender-id=softfail Received-SPF: pass (pb1.pair.com: domain m.gmane.org designates 80.91.229.3 as permitted sender) X-PHP-List-Original-Sender: php-php-dev@m.gmane.org X-Host-Fingerprint: 80.91.229.3 plane.gmane.org Received: from [80.91.229.3] ([80.91.229.3:58804] helo=plane.gmane.org) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 6E/42-20914-694B7E15 for ; Thu, 18 Jul 2013 05:25:43 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1UzkSw-0004Dk-Aw for internals@lists.php.net; Thu, 18 Jul 2013 11:25:38 +0200 Received: from 184.sub-75-220-118.myvzw.com ([75.220.118.184]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 18 Jul 2013 11:25:38 +0200 Received: from fullmoon by 184.sub-75-220-118.myvzw.com with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 18 Jul 2013 11:25:38 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: internals@lists.php.net Date: Thu, 18 Jul 2013 03:25:26 -0600 Lines: 24 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Gmane-NNTP-Posting-Host: 184.sub-75-220-118.myvzw.com User-Agent: Mozilla/5.0 (X11; Linux i686; rv:14.0) Gecko/20120714 Thunderbird/14.0 In-Reply-To: X-Archive: encrypt Subject: Re: [PHP-DEV] execute compressed PHP command-line application From: fullmoon@newsguy.com (crankypuss) On 07/18/2013 03:05 AM, Yasuo Ohgaki wrote: > Hi, > > You may use register_shutdown_function() to clean things up after exit() > > http://jp2.php.net/manual/en/function.register-shutdown-function.php > > So simply extract files to tmp dir and delete everything after execution. > I guess this is what you need. I would expect that if the target application also registers a shutdown function there could be problems, but its potential nesting is something to look into. I suppose it would also be possible to fork the application and delete the temp file once the "child" fork had completed, which /might/ be less prone to being overridden by an arbitrary application. > BTW, I don't think eval() is evil as long as programmers know what they > are doing. Neither do I, but that in itself doesn't change the way it works. Thanks for your suggestion.