X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f Date: Sat, 18 Sep 2004 13:20:44 +0300 From: "Eli Zaretskii" Sender: halo1 AT zahav DOT net DOT il To: djgpp AT delorie DOT com Message-ID: <01c49d69$Blat.v2.2.2$4dafa4a0@zahav.net.il> Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=ISO-8859-1 X-Mailer: emacs 21.3.50 (via feedmail 8 I) and Blat ver 2.2.2 In-reply-to: (message from =?ISO-8859-1?Q?Rafael_Garc=EDa?= on Fri, 17 Sep 2004 19:06:34 +0200) Subject: Re: calling unzip32 from C program References: <2r0dd4F14ift1U1 AT uni-berlin DOT de> Reply-To: djgpp AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: djgpp AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk > From: =?ISO-8859-1?Q?Rafael_Garc=EDa?= > Date: Fri, 17 Sep 2004 19:06:34 +0200 > > See: if I call unzip32 from console or from a BAT executed from > console, it returns 0; if I call unzip32 from a C program, via > system(), or from a BAT file launched from a C program, it returns 1 As I explained in my other message here, the DJGPP implementation of `system' avoids calling the shell as much as possible, and instead tries to find and invoke the program directly. If it succeeds to find the program, then its exit status will become the return value of `system', whereas the shell is always returning 0.