AIX 3.1, script and intr
Chuck Karish
karish at mindcrf.UUCP
Wed Aug 15 09:56:32 AEST 1990
In article <5306 at mace.cc.purdue.edu> abe at mace.cc.purdue.edu (Vic Abell) writes:
>In article <9008100210.AA23730 at mindcrf.mindcraft.com>
>karish at mindcrf.UUCP writes:
>>In article <5289 at mace.cc.purdue.edu> abe at 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 at mindcraft.com
Mindcraft, Inc. (415) 323-9000
More information about the Comp.unix.aix
mailing list