delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2005/01/30/15:06:24

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Message-ID: <011601c50707$21c21460$05010e0a@2mbit.com>
From: "Brian Bruns" <bruns AT 2mbit DOT com>
To: <cygwin AT cygwin DOT com>
Subject: Cygwin not passing return code to Windows?
Date: Sun, 30 Jan 2005 15:06:03 -0500
MIME-Version: 1.0
X-Scan-Signature: dff4cd0c05900c5d703d9f6ab3a67322
X-SA-Exim-Connect-IP: 138.89.133.88
X-SA-Exim-Mail-From: bruns AT 2mbit DOT com
X-IsSubscribed: yes
Note-from-DJ: This may be spam

Hello all,

I hope I'm not repeating a bug someone mentioned in the past, but here
goes.  I maintain one of the ports of ClamAV for windows, which I do
using Cygwin.

Up until Cygwin 1.5.12, the return code from stuff like clamscan was
being passed back to Windows, so programs outside of Cygwin could call
the binary and tell weather or not the program found a virus in the
file it scanned.

Now, in the latest snapshots, that is no longer the case.  See example
below using freshclam, but also applies to the other apps:

Cygwin1.dll from 1.5.12:
----------------------------
C:\clamav-devel\bin>freshclam
ClamAV update process started at Sun Jan 30 14:58:31 2005
main.cvd is up to date (version: 29, sigs: 29086, f-level: 3, builder:
tomek)
daily.cvd is up to date (version: 692, sigs: 975, f-level: 4, builder:
ccordes)

C:\clamav-devel\bin>echo %ERRORLEVEL%
1
----------------------------

Cygwin1.dll from latest 1.5.13 snapshots:
----------------------------
C:\clamav-devel\bin>freshclam
ClamAV update process started at Sun Jan 30 14:56:49 2005
main.cvd is up to date (version: 29, sigs: 29086, f-level: 3, builder:
tomek)
daily.cvd is up to date (version: 692, sigs: 975, f-level: 4, builder:
ccordes)

C:\clamav-devel\bin>echo %ERRORLEVEL%
-2147483392
----------------------------


Has the behavior been changed for a reason, or is this an unintended
side effect of something else?  I know running inside of Cygwin using
the bash shell, the return codes come back fine as expected with
either Cygwin1.dll.  This only seems to happen when running the
program outside of a full Cygwin shell.

My machine is Win2k SP4, but I've seen the same problems on XP and
2003.

Thanks all!

-- 
Brian Bruns
The Summit Open Source Development Group
http://www.sosdg.org  /  http://www.ahbl.org


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019