Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:49971 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 66800 invoked from network); 26 Oct 2010 08:29:26 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 26 Oct 2010 08:29:26 -0000 Authentication-Results: pb1.pair.com smtp.mail=johncart@cisco.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=johncart@cisco.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain cisco.com designates 144.254.224.140 as permitted sender) X-PHP-List-Original-Sender: johncart@cisco.com X-Host-Fingerprint: 144.254.224.140 ams-iport-1.cisco.com Received: from [144.254.224.140] ([144.254.224.140:25879] helo=ams-iport-1.cisco.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 81/95-35365-26196CC4 for ; Tue, 26 Oct 2010 04:29:23 -0400 Authentication-Results: ams-iport-1.cisco.com; dkim=neutral (message not signed) header.i=none X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Ar4EALItxkyQ/khNgWdsb2JhbACDH5A5jXQVAQEWIiKhMooqkhOEVHQEjVMG X-IronPort-AV: E=Sophos;i="4.58,240,1286150400"; d="scan'208,217";a="67547099" Received: from ams-core-4.cisco.com ([144.254.72.77]) by ams-iport-1.cisco.com with ESMTP; 26 Oct 2010 08:29:18 +0000 Received: from xbh-ams-201.cisco.com (xbh-ams-201.cisco.com [144.254.75.7]) by ams-core-4.cisco.com (8.14.3/8.14.3) with ESMTP id o9Q8TIav028685 for ; Tue, 26 Oct 2010 08:29:18 GMT Received: from xmb-ams-114.cisco.com ([144.254.74.89]) by xbh-ams-201.cisco.com with Microsoft SMTPSVC(6.0.3790.4675); Tue, 26 Oct 2010 10:29:18 +0200 Received: from [64.103.97.240] ([64.103.97.240]) by xmb-ams-114.cisco.com with Microsoft SMTPSVC(6.0.3790.4675); Tue, 26 Oct 2010 10:29:18 +0200 To: internals@lists.php.net Content-Type: multipart/alternative; boundary="=-1HUikdoPUdUUzGATG0Ke" Date: Tue, 26 Oct 2010 09:29:17 +0100 Message-ID: <1288081757.2598.11.camel@lenny> Mime-Version: 1.0 X-Mailer: Evolution 2.30.3 (2.30.3-1.fc13) X-OriginalArrivalTime: 26 Oct 2010 08:29:18.0414 (UTC) FILETIME=[E1C36EE0:01CB74E7] Subject: Inconsistent exit code from CLI? From: johncart@cisco.com (John Carter) --=-1HUikdoPUdUUzGATG0Ke Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Hi, When php is invoked from the command line with -h we get exit code 0 as expected: -bash-3.2# php -h ; echo $? Usage: php [options] [-f] [--] [args...] php [options] -r [--] [args...] php [options] [-B ] -R [-E ] [--] [args...] ... --re Show information about extension . --ri Show configuration for extension . 0 However if we use (what I understand to be an) invalid option we also get 0: php -Z ; echo $? Usage: php [options] [-f] [--] [args...] .... 0 I've checked a couple of other tools (ls and grep) and they return exit code 2 when the options aren't recognised. Found on 5.2.14 and 5.3.3. Thanks, John. -- John Carter Development Manager johncart@cisco.com --=-1HUikdoPUdUUzGATG0Ke--