Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!ucsd!ucbvax!mindcrf.UUCP!karish From: karish@mindcrf.UUCP (Chuck Karish) Newsgroups: comp.unix.aix Subject: Re: AIX 3.1, script and intr Summary: The same way Message-ID: <9008142356.AA07620@mindcrf.mindcraft.com> Date: 14 Aug 90 23:56:32 GMT References: <5289@mace.cc.purdue.edu> <9008100210.AA23730@mindcrf.mindcraft.com> <5306@mace.cc.purdue.edu> Sender: daemon@ucbvax.BERKELEY.EDU Organization: Mindcraft, Inc. Lines: 30 In article <5306@mace.cc.purdue.edu> abe@mace.cc.purdue.edu (Vic Abell) writes: >In article <9008100210.AA23730@mindcrf.mindcraft.com> >karish@mindcrf.UUCP writes: >>In article <5289@mace.cc.purdue.edu> abe@mace.cc.purdue.edu (Vic Abell) >>writes: >>>Does anyone know how to keep the intr character (^C in my case) from >>>terminating script? >>For sh or ksh: >> trap "" 2 >I guess I wasn't clear enough in my original posting. I was not asking how >to protect shell scripts; I was asking how to protect the script(1) program >from terminating when I type an intr character to a program whose output >I am capturing in a file via script(1). The answer is the same. Type `trap "" 2' to your interactive sh or ksh before invoking `script'. If your shell is ignoring a signal, its child will ignore it, too. The `onintr' directive to csh doesn't seem to have an option to cause the shell to ignore one signal. `onintr -', though, will cause it (and its child, the `script' process) to ignore ALL signals, including SIGINT. This will make it more complicated to recover control of your display if your application hangs. -- Chuck Karish karish@mindcraft.com Mindcraft, Inc. (415) 323-9000