Using trap command (was: Exceeded User Count)
Kenneth Brody
kenbrody at bestweb.net
Fri Feb 11 06:16:37 PST 2005
"Lerebours, Jose" wrote:
[...]
> > > I had a couple of users telnetting into SCO Unix who had in their
> > > .profile "trap '' 1 2 3", a holdover from long past dumb terminal
> > > days. These users could not click 'x' on the windows window? to close
> > > it without leaving open processes and idleout would also leave open
> > > processes. Commenting the trap command out solved the problem.
> >
> > Telling the shell to ignore SIGHUP explicitly says "I don't want to
> > kill any process if the user disconnects".
> >
>
> This is revealing to me ... and possibly the answer to all those
> "<defunct>" processes I've seen in a couple of places.
>
> I normally use `trap` as well to keep user within a shell script
> where a qualifier is chosen and filePro application is opened with
> chosen qualifier.
>
> Removing the `trap` command causes the script to close if user
> exits filePro pressing DEL key.
>
> Am I caught in a loose/loose situation or is there a remedy?
You can "tighten things up" by not telling it to ignore SIGHUP. Just tell
it to ignore only SIGINT and SIGQUIT. In other words, instead of:
trap "" 1 2 3
use
trap "" 2 3
--
+-------------------------+--------------------+-----------------------------+
| Kenneth J. Brody | www.hvcomputer.com | |
| kenbrody/at\spamcop.net | www.fptech.com | #include <std_disclaimer.h> |
+-------------------------+--------------------+-----------------------------+
Don't e-mail me at: <mailto:ThisIsASpamTrap at gmail.com>
More information about the Filepro-list
mailing list