Xref: utzoo comp.sys.ibm.pc:23632 comp.lang.c:15731 Path: utzoo!attcan!uunet!husc6!uwvax!tank!shamash!com50!mscunx!hawkmoon!det From: det@hawkmoon.MN.ORG (Derek E. Terveer) Newsgroups: comp.sys.ibm.pc,comp.lang.c Subject: system() always returns 0? Keywords: MSC5.0 Message-ID: <782@hawkmoon.MN.ORG> Date: 21 Jan 89 05:56:44 GMT Organization: One of the Eternal Champions - Richfield, MN, 554232523, USA Lines: 24 Has anyone encountered a problem with the Microsoft C 5.0 compiler always returning a 0 from the system() call, no matter what the actual command executed by system() returns? Is there a fix for this or am i misunderstanding something fundamental about the way the system() call works in msc5.0? (Like the command.com always returning the 0, which system(), in turn, returns to my program?) I'm trying to determine whether or not the executed command succeeded or not by looking at the completion code from system, ala: char buf[BUFSIZ]; sprintf(buf,"rnews < D_elricf.3aa"); if (!system(buf)) perror(buf); and i'm having a hard time of it since system() always (seems) to return 0! derek -- Derek Terveer det@hawkmoon.MN.ORG || ..!uunet!rosevax!elric!hawkmoon!det w(612)681-6986 h(612)688-0667 "A proper king is crowned" -- Thomas B. Costain