Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!elroy.jpl.nasa.gov!jpl-devvax!lwall From: lwall@jpl-devvax.jpl.nasa.gov (Larry Wall) Newsgroups: comp.lang.perl Subject: Re: Bug in 4.003 Message-ID: <1991Apr19.184655.8696@jpl-devvax.jpl.nasa.gov> Date: 19 Apr 91 18:46:55 GMT References: Reply-To: lwall@jpl-devvax.JPL.NASA.GOV (Larry Wall) Distribution: comp Organization: Jet Propulsion Laboratory, Pasadena, CA Lines: 21 In article victor@watson.ibm.com writes: : I built and tested perl-4.003 (from prep) on three platforms: IBM : BSD/RT, IBM RS/6000, and SparcStation running SunOs 4. The script : below causes perl to get a core dump on all 3. : : sub NOPIPE { : print join(',',caller(0)); : shift(@_); die "Couldn't pipe:" . join(' ',@_) . "\n"; : } : $SIG{'PIPE'} = 'NOPIPE'; : open(MESS,"| $foobar") || die "Couldn't pipe to $foobar\n"; : print MESS "Hello\n"; caller with an argument currently only works if you're running under the debugger. I'll fix that in the next patch. But I should mention that using stdio in a signal handler dealing with a fault that happened in the stdio routines is risky business. I'd use syswrite(). Larry