Path: utzoo!utgpu!jarvis.csri.toronto.edu!clyde.concordia.ca!uunet!mcsun!hp4nl!ruuinf!cs.ruu.nl From: piet@cs.ruu.nl (Piet van Oostrum) Newsgroups: comp.lang.perl Subject: Re: STDOUT & STDERR from a dumped perl script Message-ID: <2600@ruuinf.cs.ruu.nl> Date: 7 Mar 90 09:56:51 GMT References: <1648@sparko.gwu.edu> <7274@jpl-devvax.JPL.NASA.GOV> Sender: news@ruuinf.cs.ruu.nl Reply-To: piet@cs.ruu.nl (Piet van Oostrum) Organization: Dept of Computer Science, Utrecht University, The Netherlands Lines: 22 In-reply-to: lwall@jpl-devvax.JPL.NASA.GOV (Larry Wall) In article <7274@jpl-devvax.JPL.NASA.GOV>, lwall@jpl-devvax (Larry Wall) writes: ` `Apparently, there's something in the startup code that gets confused `when trying to init the stdio structure the second time through. Anyway, `the _flag byte is ending up 0, on Suns at least. Maybe they're using `XOR to install the bits, so the second time through it clears them? Anyway, `here is an unofficial patch. It's unofficial because I don't know who needs `it and who doesn't, and who it will blow out of the water. Also, it might `be something that undump should fix. I dunno. Larry, we had that problem in one of the earliest versions of perl3.0. I had a patch then, but that got lost. The problem is in the abort() call. It closes the files, and that means on most systems, clearing the flags. So you must abstain from closing, i.e you must have some alternative to abort that doesn't close the files. (Like just sending a signal to yourself). You should flush the files however. (There is no portable way to flush all open files, unless you keep a list of the open files yourself.) -- Piet* van Oostrum, Dept of Computer Science, Utrecht University, Padualaan 14, P.O. Box 80.089, 3508 TB Utrecht, The Netherlands. Telephone: +31-30-531806 Uucp: uunet!mcsun!hp4nl!ruuinf!piet Telefax: +31-30-513791 Internet: piet@cs.ruu.nl (*`Pete')