From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,a33ec7badc330d9e X-Google-Attributes: gid103376,public From: kst@thomsoft.com (Keith Thompson) Subject: Re: Ada Equivalent of "system()" in C? Date: 1996/04/17 Message-ID: #1/1 X-Deja-AN: 147968059 sender: news@thomsoft.com (USENET News Admin @flash) x-nntp-posting-host: pulsar references: <4l1dbi$pho@rational.rational.com> organization: Thomson Software Products, San Diego, CA, USA newsgroups: comp.lang.ada originator: kst@pulsar Date: 1996-04-17T00:00:00+00:00 List-Id: In emery@grebyn.com (David Emery) writes: [...] > Note that the return value is NOT the return value of the command, but > rather of the fork() that is used to set up execution of the command. That's not quite correct. The system function returns -1 (and sets errno) if the fork or exec fails. Otherwise it returns the exit status of the shell (sh) that it invokes to execute the command; the format of this exit status is a bit tricky. This information is from a SunOS 5.4 (Solaris 2.4) man page; see your local man page for details. The above is Unix-specific. The ISO C standard has very little to say about the return value of system, or even its semantics. -- Keith Thompson (The_Other_Keith) kst@thomsoft.com <*> TeleSoft^H^H^H^H^H^H^H^H Alsys^H^H^H^H^H Thomson Software Products 10251 Vista Sorrento Parkway, Suite 300, San Diego, CA, USA, 92121-2718 This sig uses the word "Exon" in violation of the Communications Decency Act.