[mdlug] logout script?

Carl T. Miller millerc at cantonpl.org
Wed Dec 20 17:06:13 EST 2006


Wojtak, Greg wrote:
> Either or... the problem is that since we exec the actual binary of the
> application, /usr/bin/ksh gets replaced, right?  So we can't do anything
> after that since when the users exit out of the telnet based app they get
> logged out of their session.  Does that make sense?  The more I think
> about
> it, the more I think that the only way to do this is to not exec the
> binary
> and do the necessary cleanup tasks after the application exits.  We are
> loathe to do this simply because of the sheer number of processes running
> (it takes a full minute for ps to even begin to dump out the process
> table).

Greg, do you mind saying what you want to do after the application
exits?  You might want to launch a process in the background that
waits for the application to finish, then runs.  If it's a matter
of files that need to be deleted, you might be able to set up a
cron job, thus not requiring the clean up to be driven by a logout
event.

Another possibility is to have the login script create a cleanup
script which would be run at a later time or at the close of the
application.  Or you could create the cleanup script and have it
run the next time the same user logs back in.  It really depends
on the specific things that need to be done.

c





More information about the mdlug mailing list