X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f Date: Sat, 18 Sep 2004 13:36:08 +0300 From: "Eli Zaretskii" Sender: halo1 AT zahav DOT net DOT il To: djgpp AT delorie DOT com Message-ID: <01c49d6b$Blat.v2.2.2$8aa2c0c0@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: <414B48C0.1B6F801F@yahoo.com> (message from CBFalconer on Fri, 17 Sep 2004 20:41:41 GMT) Subject: Re: calling unzip32 from C program References: <2r0dd4F14ift1U1 AT uni-berlin DOT de> <414B140F DOT 98A3CCF4 AT yahoo DOT com> <414B48C0 DOT 1B6F801F AT yahoo DOT com> 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: CBFalconer > Date: Fri, 17 Sep 2004 20:41:41 GMT > > > I could find a more simple solution, like using another unzip > > program (I have tried an old PKUNZIP.EXE that works fine), but > > the point is to know what is failing here. > > The failure is the use of "system()". Actually, there's no failure I can see here at all. > In C the return only says > whether or not some shell was successfully called, and has nothing > to do with whether the shell succeeded in executing the command. Actually, the C9x spec says that the return value is ``impementation defined'', while the Posix spec says that the return value is the exit status of the command language interpreter, not just whether it succeeded in executing the command. In DJGPP, we tried to emulate a smarter shell whose exit status is the same as the exit status of the command it invoked, and to be compatible with Posix.