Path: utzoo!utgpu!news-server.csri.toronto.edu!torsqnt!hybrid!robohack!eci386!clewis From: clewis@eci386.uucp (Chris Lewis) Newsgroups: comp.lang.perl Subject: Re: Signal handling... Message-ID: <1990Mar26.213114.25582@eci386.uucp> Date: 26 Mar 90 21:31:14 GMT References: <1990Mar21.173423.7281@eci386.uucp> <100773@convex.convex.com> Reply-To: clewis@eci386.UUCP (Chris Lewis) Organization: Elegant Communications Inc., Toronto, Canada Lines: 19 In article <100773@convex.convex.com> tchrist@convex.COM (Tom Christiansen) writes: | In article <1990Mar21.173423.7281@eci386.uucp> clewis@eci386 (Chris Lewis) writes: | >I want to be able to set signals in Perl for SIGINT/SIGQUIT/SIGTERM etc. | >analogously to the traditional C: | > | > if (signal(SIGINT, SIG_IGN) == SIG_DFL) | > signal(SIGINT, &myhandler); | | Isn't this for people who don't have shells with job control and | whose background jobs still get keyboard interrupts? No. This is for people who want SIGINT to be ignored in the background (as is normal), but respected with a non-default handler in the foreground allowing the program to catch it and use the handler to clean things up. Lots of standard UNIX utilities need to catch SIGINT in this fashion. -- Chris Lewis, Elegant Communications Inc, {uunet!attcan,utzoo}!lsuc!eci386!clewis Ferret mailing list: eci386!ferret-list, psroff mailing list: eci386!psroff-list