Path: utzoo!utgpu!water!watmath!uunet!amdahl!apple!bloom-beacon!labrea!rutgers!noao!asuvax!nud!mcdchg!ditka!csanta!greg From: greg@csanta.UUCP (Greg Comeau) Newsgroups: unix-pc.bugs Subject: Re: trap 2 on /etc/profile Message-ID: <138@csanta.UUCP> Date: 12 Sep 88 12:50:40 GMT References: <349@whizz.UUCP> Reply-To: greg@csanta.UUCP (Root) Distribution: unix-pc Organization: Comeau Computing, Richmond Hill, NY Lines: 37 In article <349@whizz.UUCP> bbh@whizz.UUCP (Bud Hovell) writes: > > ...[ discussion of `trap' commands in /etc/profile in their influence on > Informix SQL ] ... > The three traps in my /etc/profile: 1) trap '' 1 2 3 2) trap "exit" 1 2 3 3) trap 1 2 3 look the same as yours. They mean: 1) ignore signals 1 (hangup), 2 (interrupt), and 3 (quit). 2) if signal 1, 2, or 3 is recieved, then run the `exit' command. 3) *reset* signals 1, 2, and 3 to the original values they had when the given shell was entered. respectively. This does not appear to negate anything said by Kernighan in The UNIX Programming Environment. ?? Also, note that (3) does not disable *or* enable signals specified, something like (1) or `trap "" 1 2 3' does that. (3) only serves to reset... > However, I must stand by the basic facts offered: with the trap 2 command, > my 610 terminal and console completely loose the key function when they > go into Informix SQL, and this problem is eliminated (with no apparent side > effects) by removing them. (Informix disclaims any knowledge). Fine. If that is the case, then Informix SQL expect the signals to be a certain way (and it can check them and do certain thing based on their values which *seems* to be the case here... why I don't know..). Do not however change this in /etc/profile, but change it in each user's .profile file. Or better yet, make a shell script that does the correct trap and then `exec's informix and tell the users not to run informix directly. You can enforce this by renaming the original binary...