Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!zaphod.mps.ohio-state.edu!think.com!paperboy!meissner From: meissner@osf.org (Michael Meissner) Newsgroups: comp.lang.perl Subject: Re: perl & vfork on sparc machines Message-ID: Date: 22 Apr 91 18:50:36 GMT References: <549@appserv.Eng.Sun.COM> Sender: news@OSF.ORG Organization: Open Software Foundation Lines: 28 In-reply-to: lm@slovax.Eng.Sun.COM's message of 19 Apr 91 18:01:50 GMT In article <549@appserv.Eng.Sun.COM> lm@slovax.Eng.Sun.COM (Larry McVoy) writes: | I was porting perl to an alpha copy of our next release of the OS and ran | into the following problem. It is unlikely that you will see this, but | just in case... | | In util.c, function mypopen(), there is a line like so: | | while ((pid = (doexec?vfork():fork())) < 0) | | The problem showed up when I compiled w/ the optimizer turned on. The bug | is that the internal release did not have a copy of vfork.h which has a | pragma that tells the compiler not to optimize around vfork()s (a vfork | is quite similar to a longjmp and both have a nasty interactions with | register allocations). The arg "mode" was in a register and it got | stomped on by the child. | | The only reason I mention it is that you may run into the problem on | some other risc that doesn't have vfork.h or calls it something else. | Pretty unlikely, but you never know. I may be mistaken, but Sun seems to be the only system with such problems. Maybe it's because of register windows..... -- Michael Meissner email: meissner@osf.org phone: 617-621-8861 Open Software Foundation, 11 Cambridge Center, Cambridge, MA, 02142 Considering the flames and intolerance, shouldn't USENET be spelled ABUSENET?