From owner-freebsd-questions Tue Oct 23 8:17:24 2001 Delivered-To: freebsd-questions@freebsd.org Received: from Moebius.baked.net (moebius.baked.net [209.48.190.36]) by hub.freebsd.org (Postfix) with ESMTP id 696E237B406 for ; Tue, 23 Oct 2001 08:17:20 -0700 (PDT) Received: (from spong@localhost) by Moebius.baked.net (8.9.3/8.9.3) id LAA26329; Tue, 23 Oct 2001 11:15:38 -0400 Date: Tue, 23 Oct 2001 11:15:38 -0400 From: Matt Spong To: Cliff Sarginson Cc: Giorgos Keramidas , Matthew Blacklow , freebsd-questions Subject: Re: C clue on FreeBSD again! Message-ID: <20011023111538.A26176@Moebius.baked.net> References: Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="ew6BAiZeqk4r7MaW" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.3.23i X-Homepage: http://forkbomb.net X-PGP-Key: http://forkbomb.net/realworld/pubkey.asc X-PGP-Fingerprint: 1EAC ADBD B6E9 8317 3001 D2F3 F5C5 9DB2 8F65 88F3 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG --ew6BAiZeqk4r7MaW Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable > The return value from "system" won't be of much use to you, it will > only indicate if the "system" call managed to successfully exec the > program you asked it to.=20 No, system() returns -1 if fork() failed, 127 if executing the shell failed, and the return value of the process otherwise. > Actually, "system" is also a highly > unportable thing to use, if that is of any importance to you. True. But this is how it works on both FreeBSD and Linux. Matt --=20 Matt Spong || spong@baked.net || AIM: Spong1027 || http://www.forkbomb.net "Those who desire to give up freedom in order to gain security, will not have, nor do they deserve, either one." -Benjamin Franklin --ew6BAiZeqk4r7MaW Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org iD8DBQE71YmZ9cWdso9liPMRArFYAJ9rPJ0gLBWppDwA5lTWMhxOO/BrCwCeJ+0O wVZcHjRZSsQtNxJPpAU+kgA= =pHZ2 -----END PGP SIGNATURE----- --ew6BAiZeqk4r7MaW-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message