in reply to (WAY OT) Setting up a user's profile

I have done this before, and have the following to say :
is it ksh ? (as you said): If this is Korn Shell, read up on the trap command.

can you change the /etc/passwd: You can change the shell in the /etc/passwd to be the program in question. Then killing it, or exiting it in any way would kill the session.

Or, lastly, i would suggest catching the signals using the %SIG hash within the perl program this is for (or whatever catch mechanisim if it is not perl)
"They shall not overcome. Whoever told them that the truth shall set them free was obviously and grossly unfamiliar with federal law."
    -- John Ashcroft

Replies are listed 'Best First'.
Re: Re: (WAY OT) Setting up a user's profile
by RedDog (Pilgrim) on Oct 01, 2001 at 19:02 UTC
    I wasn't able to change the shell to the name of the program in the /etc/passwd file(although I do have root access to the system), but I now give you the following lines which solved my problem:
    USER=`who am i|cut -c 1-8` trap 'trap 0;exit' 0 1 3 15 cobrun /home/production/cobolobj/eftchg $USER wait exit
    Your reference to the trap command got me looking in the right direction. Thanks again for your help.

    RedDog