Hello all,
I am attempting to patch a UNIX network-server program so that it will
restrict the number of times a user can login. To this end, I have
implemented
a memory-resident list. However the server is basically an endless loop
that listens for packets on the network, and the only way to remove the
program
is to kill its process. This immediately destroys the information in
memory...
Is there any way of trapping the "kill" signal (there *must* be, I would
think)
so that I can tell the process to write the memory structure to disk before
it is lost? I need to either cover this eventuality, or force everyone to
logout.
Thanks,
Chris.