C optimizer
Lawrence V. Cipriani
lvc at cbnews.ATT.COM
Mon Feb 27 01:14:05 AEST 1989
In article <9705 at smoke.BRL.MIL>, gwyn at smoke.BRL.MIL (Doug Gwyn ) writes:
! In article <4276 at cbnews.ATT.COM> lvc at cbnews.ATT.COM (Lawrence V. Cipriani) writes:
! -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!
!
! Anyone who fork()s then returns inside a signal handler deserves to suffer.
Yes, but so what. The question basically was "Is getpid() != getpid() ever
true." It was not restricted to what was reasonable or common coding practice,
or sanctioned by the pANS, or your personal preference, or anything else. It
isn't necessary to say something is a bad idea when that wasn't asked, so I
didn't.
--
Larry Cipriani, att!cbnews!lvc or lvc at cbnews.att.com
More information about the Comp.lang.c
mailing list