Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!nrl-cmf!ames!pasteur!ucbvax!decwrl!labrea!rutgers!bellcore!faline!thumper!ulysses!mhuxo!mhuxu!att!cbnews!lvc From: lvc@cbnews.ATT.COM (Lawrence V. Cipriani) Newsgroups: comp.lang.c Subject: Re: C optimizer Keywords: C pure function optimization Message-ID: <4276@cbnews.ATT.COM> Date: 23 Feb 89 16:09:38 GMT References: <515@larry.UUCP> <9648@smoke.BRL.MIL> <36034@bbn.COM> <3121@ficc.uu.net> <1028@frog.UUCP> Reply-To: lvc@cbnews.ATT.COM (Lawrence V. Cipriani) Organization: AT&T Network Systems Lines: 13 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. How about if the left hand getpid() is called, and before the right hand getpid() is called a signal comes in, causing a signal handler to be called, then the signal handler does a fork. Then, the interrupt handler returns and the right hand getpid() is called. Voila! -- Larry Cipriani, att!cbnews!lvc or lvc@cbnews.att.com