Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!ucbvax!decwrl!decvax!ima!cfisun!lakart!dg From: dg@lakart.UUCP (David Goodenough) Newsgroups: comp.lang.c Subject: Re: C optimizer Message-ID: <453@lakart.UUCP> Date: 28 Feb 89 17:02:35 GMT References: <36662@think.UUCP> Organization: Lakart Corporation, Newton, MA Lines: 21 From article <36662@think.UUCP>, by barmar@think.COM (Barry Margolin): ] In article <1028@frog.UUCP> john@frog.UUCP (John Woods) writes: ]>I think that if ]> (getpid() != getpid()) ]>ever evaluated to 1, I would be severely astonished. ] ] Well, how about ] ] (pid = getpid(), (void) fork(), pid != getpid()) ] ] ? It will evaluate to 0 in the parent process, 1 in the child ] process. True - but I don't see any references to fork() in Mr.Woods' posting. What he is stating is that _IN THE ABSENCE_ of fork() calls, getpid() had better return an unchanging value. -- dg@lakart.UUCP - David Goodenough +---+ IHS | +-+-+ ....... !harvard!xait!lakart!dg +-+-+ | AKA: dg%lakart.uucp@xait.xerox.com +---+