Solved

Auto Logout  from Unix

Posted on 1997-12-03
4
880 Views
Last Modified: 2012-08-14
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
0
Comment
Question by:nill
  • 2
4 Comments
 
LVL 84

Expert Comment

by:ozo
Comment Utility
exec fglgo myprog

0
 
LVL 1

Accepted Solution

by:
terrycj earned 100 total points
Comment Utility
use this:

exec fglgo myprog

the shell will then be replaced by your informix
program. when it exits (via ^C or any other way)
the user will definitely be logged out.

terry.

0
 

Author Comment

by:nill
Comment Utility
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.
0
 
LVL 1

Expert Comment

by:terrycj
Comment Utility
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.

0

Featured Post

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

Attention: This article will no longer be maintained. If you have any questions, please feel free to mail me. jgh@FreeBSD.org Please see http://www.freebsd.org/doc/en_US.ISO8859-1/articles/freebsd-update-server/ for the updated article. It is avail…
I promised to write further about my project, and here I am.  First, I needed to setup the Primary Server.  You can read how in this article: Setup FreeBSD Server with full HDD encryption (http://www.experts-exchange.com/OS/Unix/BSD/FreeBSD/A_3660-S…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
In a previous video, we went over how to export a DynamoDB table into Amazon S3.  In this video, we show how to load the export from S3 into a DynamoDB table.

728 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now