Path: utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!thunder.mcrcim.mcgill.edu!snorkelwacker.mit.edu!spool.mu.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: pager pipes Message-ID: <11482@jpl-devvax.JPL.NASA.GOV> Date: 18 Feb 91 21:58:52 GMT References: <1991Feb16.210445.7760@convex.com> <1991Feb17.024739.17286@iwarp.intel.com> <1991Feb17.230545.16898@convex.com> Reply-To: lwall@jpl-devvax.JPL.NASA.GOV (Larry Wall) Organization: Jet Propulsion Laboratory, Pasadena, CA Lines: 20 In article <1991Feb17.230545.16898@convex.com> tchrist@convex.COM (Tom Christiansen) writes: : Unlike most applications of kill(2), a ^C will cause the the signal to be : delivered to the entire process group, not just to the "active" process. : This means that both the pager and perl will see it. I think that people : who expect otherwise have been lulled into this belief by the behavior of : system(3), which will ignore keyboard interrupts and quits. Perl blocks SIGINT and SIGQUIT while waiting for pipes to shut down and while executing the system operator, just like system(3). It does not block signals on an output pipe until you do the close, however. If you have less than 4k to page, you can just shove it down the pipe and close, but much more than 4k (typically) and you'll block before getting to the close. So you have to ignore the signals yourself. Saying local($SIG{'INT'}) = 'IGNORE'; local($SIG{'QUIT'}) = 'IGNORE'; in the right spot should suffice. Larry