Link to home
Start Free TrialLog in
Avatar of nill
nill

asked on

Auto Logout from Unix

In the file .profile, I added:
1. stty ^C (to define Ctrl-C as Interrupt Key)
2. fglgo myprog (to run an Informix program)
3. exit (so that user will automatically logout)
However, everytime this Interrupt Key is hit in my
Informix program, the user doesn't logout anymore.
The user remains on the command line.

How can I solve this?

Thank you very much.

NOTE: my version of UNIX is SCO
Avatar of ozo
ozo
Flag of United States of America image

exec fglgo myprog

ASKER CERTIFIED SOLUTION
Avatar of terrycj
terrycj

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of nill
nill

ASKER

This really works if I run an Informix program directly from
.profile.  However, when I run an Informix program from a UNIX
script file, the program does not go back to the script file
anymore.  I know this is what is going to happen, but I'm just
curious if there is a way to ensure that it will go back to
the script file.

Thanks.
it will go back to the script
if you take out the 'exec'.

use the exec when you want the process executing
the script to be simply replaced by your program.
without the exec it (in this case a shell which is
reading and excuting commands) will continue on
to deal with further commands.