Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:15448 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 99367 invoked by uid 1010); 15 Mar 2005 01:56:44 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 99350 invoked from network); 15 Mar 2005 01:56:44 -0000 Received: from unknown (HELO emini.dk) (127.0.0.1) by localhost with SMTP; 15 Mar 2005 01:56:44 -0000 X-Host-Fingerprint: 192.38.9.232 gw2.emini.dk Linux 2.4/2.6 Received: from ([192.38.9.232:28506] helo=gw2.emini.dk) by pb1.pair.com (ecelerity HEAD r(5124)) with SMTP id B2/9B-31540-BD046324 for ; Mon, 14 Mar 2005 20:56:43 -0500 Received: from [10.0.0.130] (gw1.emini.dk [212.242.124.121]) by gw2.emini.dk (Postfix) with ESMTP id 7E4E053CE6; Tue, 15 Mar 2005 02:56:40 +0100 (CET) In-Reply-To: <42363C02.3020109@davyandbeth.com> References: <4236213F.4070209@davyandbeth.com> <20050315005504.23873.qmail@lists.php.net> <42363C02.3020109@davyandbeth.com> Mime-Version: 1.0 (Apple Message framework v619.2) Content-Type: text/plain; charset=US-ASCII; format=flowed Message-ID: <22572bc47b4303ddca47f39e40dc628b@emini.dk> Content-Transfer-Encoding: 7bit Cc: Christian Stadler , internals@lists.php.net Date: Tue, 15 Mar 2005 02:57:12 +0100 To: Davy Durham X-Mailer: Apple Mail (2.619.2) Subject: Re: [PHP-DEV] Re: CLI issue: Changing STDERR From: edink@emini.dk (Edin Kadribasic) On Mar 15, 2005, at 2:36, Davy Durham wrote: > Iteresting.. but no, that won't work because the redirection is a > construct of a running shell.. not the exec system function that would > be interpreting that line. > > That got me thinking tho.. to try something like > > #!/bin/bash -c exec /usr/bin/php 2>/path/filename > > which would seem to maybe work if the php interpreter got the rest of > the file as input. But, apparently bash isn't liking -c after it's > already been used on a sh-bang. :( Its not bash, it's your kernel limitation (i guess linux). Most unix kernels allow only bin name + 1 arg on the shebang line. FreeBSD is a notable exception here. Edin