From owner-freebsd-hackers Tue Mar 23 15:26:58 1999 Delivered-To: freebsd-hackers@freebsd.org Received: from oracle.dsuper.net (oracle.dsuper.net [205.205.255.1]) by hub.freebsd.org (Postfix) with ESMTP id 9F34F14C23 for ; Tue, 23 Mar 1999 15:26:54 -0800 (PST) (envelope-from bmilekic@oracle.dsuper.net) Received: from localhost (bmilekic@localhost) by oracle.dsuper.net (Delphi 1.3/8.6.9) with ESMTP id SAA03413; Tue, 23 Mar 1999 18:26:33 -0500 (EST) Date: Tue, 23 Mar 1999 18:26:27 -0500 (EST) From: Bosko Milekic To: Mark Ovens Cc: hackers@FreeBSD.ORG Subject: Re: Problem with fork() in 3.1 In-Reply-To: <36F79238.5FC1DA7C@uk.radan.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Replace execvp() with execvl("./d2c","d2c",NULL,NULL); and the problem should be fixed. You may also try adding dup2()s before the close()s in your parent, although I don't think it's necessary here... Regards, Bosko M. -- Bosko Milekic http://www.supernet.ca/~bmilekic/ Delphi SuperNet voice: (+1) 514 281-7500 fax: (+1) 514 281-6599 PGP Key available upon request. On Tue, 23 Mar 1999, Mark Ovens wrote: > Date: Tue, 23 Mar 1999 13:08:08 +0000 > From: Mark Ovens > To: hackers@FreeBSD.ORG > Subject: Problem with fork() in 3.1 > > Hi, > > Firstly, my apologies if this is an inappropriate question to post > here, but I have asked in -questions and received no response and I am > completely stumped. If anyone could spare a couple of minutes to look > at this for me I would be very grateful (my learning curve is > currently flat-lining). > > I have been learning about Inter Process Comms and have written the 2 > progs included below. It all worked under 2.2.8 however when I u/g to > 3.1-R (from the CD) it no longer works :-(. > > Under 2.2.8 the output was: > > % demo > RESULT! - Circumference-106.814150 > % > > however, under 3.1 this happens: > > % demo > RESULT! - > % > [snip snip] To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message