From owner-freebsd-questions Mon Dec 21 17:44:10 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id RAA28627 for freebsd-questions-outgoing; Mon, 21 Dec 1998 17:44:10 -0800 (PST) (envelope-from owner-freebsd-questions@FreeBSD.ORG) Received: from sam.networx.ie (ts05-089.dublin.indigo.ie [194.125.220.99]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id RAA28618 for ; Mon, 21 Dec 1998 17:44:04 -0800 (PST) (envelope-from mike@NetworX.ie) Received: from mike (mike.NetworX.ie [194.9.12.33]) by sam.networx.ie (8.8.5/8.8.5) with SMTP id BAA25121; Tue, 22 Dec 1998 01:36:50 GMT X-Organisation: I.T. NetworX Ltd X-Business: Network Applications, Consultancy and Training X-Address: Stonebridge House, Shankill, Co. Dublin, Ireland X-Voice: +353-1-28-27-233 X-Fax: +353-1-28-27-230 Date: Tue, 22 Dec 1998 01:44:53 PST From: Michael Ryan Subject: Re: Mystery with pipe(), fork() and dup() To: Jonathan Chen cc: FreeBSD Support Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; CHARSET=US-ASCII Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Tue, 22 Dec 1998 14:36:40 +1300 (NZDT) Jonathan Chen wrote: > Well, for one thing > > if (pid) > > really means: > > if (pid != 0) I know. In the context of my program if (pid == 0) means the child process will execute the code, whereas if (pid) means the parent process will execute the code. Bye, Mike mike@NetworX.ie www.NetworX.ie --- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message