Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:52092 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 42706 invoked from network); 30 Apr 2011 12:18:34 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 30 Apr 2011 12:18:34 -0000 Authentication-Results: pb1.pair.com header.from=addw@phcomp.co.uk; sender-id=permerror Authentication-Results: pb1.pair.com smtp.mail=addw@phcomp.co.uk; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain phcomp.co.uk designates 80.68.91.63 as permitted sender) X-PHP-List-Original-Sender: addw@phcomp.co.uk X-Host-Fingerprint: 80.68.91.63 bytemark.phcomp.co.uk Received: from [80.68.91.63] ([80.68.91.63:49472] helo=bytemark.phcomp.co.uk) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 00/B4-10915-81EFBBD4 for ; Sat, 30 Apr 2011 08:18:33 -0400 Received: from freshmint.phcomp.co.uk ([78.32.209.33] helo=mint.phcomp.co.uk) by bytemark.phcomp.co.uk with esmtps (TLSv1:AES256-SHA:256) (Exim 4.71) (envelope-from ) id 1QG97y-0001Kp-3m; Sat, 30 Apr 2011 13:18:26 +0100 Received: from addw by mint.phcomp.co.uk with local (Exim 4.63) (envelope-from ) id 1QG97x-0003Aq-DK; Sat, 30 Apr 2011 13:18:25 +0100 Date: Sat, 30 Apr 2011 13:18:25 +0100 To: Ferenc Kovacs Cc: PHP Internals Message-ID: <20110430121825.GR8496@phcomp.co.uk> Mail-Followup-To: Ferenc Kovacs , PHP Internals References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.2i Organization: Parliament Hill Computers Ltd Subject: Re: [PHP-DEV] adding low level file handling stuff From: addw@phcomp.co.uk (Alain Williams) On Sat, Apr 30, 2011 at 02:04:12PM +0200, Ferenc Kovacs wrote: > Hi. > > recently I found a nice blogpost about how to properly daemonize a php > daemon: > http://andytson.com/blog/2010/05/daemonising-a-php-cli-script-on-a-posix-system/ > I've noticed in this article, that you can replace/redirect the > STDIN/STDOUT/STDERR from inside of your script, you have to close them, and > open in the correct order. > It works (at least on linux), because the opened files will have the 1,2,3 Surely you mean: 0, 1, 2 -- Alain Williams Linux/GNU Consultant - Mail systems, Web sites, Networking, Programmer, IT Lecturer. +44 (0) 787 668 0256 http://www.phcomp.co.uk/ Parliament Hill Computers Ltd. Registration Information: http://www.phcomp.co.uk/contact.php #include