X-Recipient: archive-cygwin AT delorie DOT com DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:date:from:reply-to:to:message-id:subject :mime-version:content-type:content-transfer-encoding:references; q=dns; s=default; b=aV6T/BnuxKx1Cj4ZJm25nknsJVoRBEj9B4Ithzamt2B jEeX9Ds0HzwdYzv5l8BA/ZGvGWDBvLbg5FzidrEUaBLZmb2CKH4E0Xza4i8AX5FK TorqA6RCs/1PSGAX25kq8fzCcFqaEpacDocJs5dFlodsi2lKP3X7cBDypSEJUDFY = DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:date:from:reply-to:to:message-id:subject :mime-version:content-type:content-transfer-encoding:references; s=default; bh=AvO+UEH3yaP146rMq8PotJOZS0M=; b=YfT+zoM4JD/Xw2Kya bnrABzjpCyaPZTiDpzn8BCaTspQPwaDiy/10OsS565pwR5EIawdIoKgVByVGxEeV Nq/YmuF5v1L5R5pivdcKVKD3oRYs5RLJKwdeDAOCdFMfFcD8IQXM4Zf/kiUX/nLL aRPmZJkENr9uwoKt8rSOJ0XgHY= Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.7 required=5.0 tests=BAYES_20,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.2 spammy=Hx-spam-relays-external:sk:tm13.bu, H*RU:sk:tm13.bu, H*R:D*yahoo.com, H*F:D*yahoo.com X-HELO: nm31-vm1.bullet.mail.ne1.yahoo.com Date: Thu, 31 Mar 2016 13:01:22 +0000 (UTC) From: Cristian Reply-To: Cristian To: "cygwin AT cygwin DOT com" Message-ID: <1233154500.205789.1459429282664.JavaMail.yahoo@mail.yahoo.com> Subject: windows exit codes truncated to 1 Byte MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit References: <1233154500 DOT 205789 DOT 1459429282664 DOT JavaMail DOT yahoo DOT ref AT mail DOT yahoo DOT com> I noted that exit codes returned by CMD and other apps (msiexec) are truncated to 1 byte (0 .. 255). Steps to reproduce: 1) Create a batch with this content: $ cat ./test.bat @echo off rem ==================== echo Test exit code 266 exit /B 266 rem ==================== 2) run the batch file: $ ./test.bat Test exit code 266 3) check exit code $ echo $? 10 I would expect 266 but I got 10 instead. I checked for other codes and the result is the same. Windows exit codes are represented using 32 bits, so is this limitation intentional? Best regards, Cristi -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple