From owner-freebsd-doc@FreeBSD.ORG Mon Feb 11 12:34:36 2013 Return-Path: Delivered-To: freebsd-doc@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 09C35359 for ; Mon, 11 Feb 2013 12:34:36 +0000 (UTC) (envelope-from erichsfreebsdlist@alogt.com) Received: from alogt.com (alogt.com [69.36.191.58]) by mx1.freebsd.org (Postfix) with ESMTP id A32A03F3 for ; Mon, 11 Feb 2013 12:34:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=alogt.com; s=default; h=Content-Transfer-Encoding:Content-Type:Mime-Version:References:In-Reply-To:Message-ID:Subject:Cc:To:From:Date; bh=uglqQ9PRDFZU7+cagtst0R+Y/tGhxHJKklHBNBu/a9U=; b=pC7Ip9dWW2E2V1JMvCW6T5h+UIUdpdIC8XJJxQTRo5IYJmH57BTd9AFWFqvbC6Fnm8OhGx2ZI+/c2Qz5HTcyimRHjXPMAN2bdwL3zSLU8zL21V7QiPAmjfguzcVsTE8j; Received: from [122.129.203.50] (port=33914 helo=X220.ovitrap.com) by sl-508-2.slc.westdc.net with esmtpsa (SSLv3:DHE-RSA-AES128-SHA:128) (Exim 4.80) (envelope-from ) id 1U4saf-001OfG-PG; Mon, 11 Feb 2013 05:34:34 -0700 Date: Mon, 11 Feb 2013 19:34:30 +0700 From: Erich Dollansky To: Peter Pentchev Subject: Re: missing information in man 3 system Message-ID: <20130211193430.2a7ef6eb@X220.ovitrap.com> In-Reply-To: <20130211115917.GA5786@straylight.m.ringlet.net> References: <20130211120438.730ce5d3@X220.ovitrap.com> <20130211094557.GB5801@straylight.m.ringlet.net> <20130211182757.475efca2@X220.ovitrap.com> <20130211115917.GA5786@straylight.m.ringlet.net> X-Mailer: Claws Mail 3.9.0 (GTK+ 2.24.6; amd64-portbld-freebsd10.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - sl-508-2.slc.westdc.net X-AntiAbuse: Original Domain - freebsd.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - alogt.com X-Get-Message-Sender-Via: sl-508-2.slc.westdc.net: authenticated_id: erichsfreebsdlist@alogt.com X-Source: X-Source-Args: X-Source-Dir: Cc: freebsd-doc@freebsd.org X-BeenThere: freebsd-doc@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Documentation project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Feb 2013 12:34:36 -0000 Hi, On Mon, 11 Feb 2013 13:59:17 +0200 Peter Pentchev wrote: > On Mon, Feb 11, 2013 at 06:27:57PM +0700, Erich Dollansky wrote: > > > > > > > > if (WIFEXITED(code)) { > > > printf("The program exited with code %d\n", > > > WEXITSTATUS(code)); > > > > So, this is what I need. > > Actually you need the whole set of tests, not just the WIFEXITED case, > since the program you've ran through system() may have been killed by > a signal or something. > I am aware of this. This is what I need to get the results in case of a normal program termination. > Glad to have been of assistance! Yes, made my life much easier. Erich