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
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
exec fglgo myprog
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
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.
.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.
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.