From: Damian Yerrick Newsgroups: comp.os.msdos.djgpp Subject: Re: fork() should generate warning, Was (Re: DJGPP Setup Utility in the making.) Organization: Pin Eight Software http://pineight.8m.com/ Message-ID: References: <87jegs02e44 AT enews2 DOT newsguy DOT com> <389DAEE6 DOT 5B0550A5 AT tudor21 DOT net> <389EC8D9 DOT 1A02AA45 AT softhome DOT net> <389F175F DOT 9EC378DE AT softhome DOT net> <38A06E14 DOT 29AD52CC AT tudor21 DOT net> <38A176D2 DOT 75873E8F AT softhome DOT net> <38A194FF DOT 14FEB94B AT americasm01 DOT nt DOT com> X-Newsreader: Forte Agent 1.7/32.534 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Lines: 25 X-Trace: /Kw5eDlOQaXeHH0Lsmbbjt17gfDrr5p/dVQb2MjNFHt9/3dg1SHCOKH3yrM3CObUAhGL0fzphbqO!B4FjkuE3IGVawky7xvC+pgiMgIntj97yvJZQem/LeH99nyf1yA3A3TTna18H4ePxj6qukM9tkq2e!AfOaiSU= X-Complaints-To: abuse AT gte DOT net X-Abuse-Info: Please be sure to forward a copy of ALL headers X-Abuse-Info: Otherwise we will be unable to process your complaint properly NNTP-Posting-Date: Thu, 10 Feb 2000 17:23:23 GMT Distribution: world Date: Thu, 10 Feb 2000 17:23:23 GMT To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com On Wed, 09 Feb 2000 11:25:35 -0500, "Campbell, Rolf [SKY:1U32:EXCH]" wrote: >Laurynas Biveinis wrote: > >> Here comes one disadvantage that DJGPP has library >> functions like fork(), pipe() etc. which always fail. >> I moves meaningful error message from compilation >> to runtime. > > That's a good point. I wonder why there isn't a compiler warning >for usage of 'fork' or any other UNIX functions that will always fail >under DJGPP. I suspect it would make programs easier to port to have >the compiler point you to a line that will not work rather than hope >that the original program checks for error during fork and prints some >meaningful message. Try this at the top of your source files: #define fork FORK_OFF -- Damian Yerrick http://yerricde.tripod.com/ Comment on story ideas: http://home1.gte.net/frodo/quickjot.html AOL is sucks! Find out why: http://anti-aol.org/faqs/aas/ View full sig: http://www.rose-hulman.edu/~yerricde/sig.html