[comp.unix.sysv386] need something that kills a session after a set period of inactivity

root@vort.uucp (root) (01/12/91)

for reasons of it's own, "trn" hangs on a serial line. the user can't do
anything to get control back, including severing the connection (if s/he
does, and re-establishes the connection, the "trn" process is still there
and s/he's still stuck). after 10 minutes of inactivty the modem hangs up
the phone, but the "trn" is totally oblivious to the hangup, and consequently
the next user that calls in, usually my feed, gets connected to "trn"
and not getty. the next morning i wander in, and have to kill that shell
dead (the "trn" seems to ignore kill -9) to free up the line.

i've looked at "trn" and don't see anything wrong. i have SIGHUP in
gettydefs, and every user has a "stty hupcl" in his/her .login. beats me
folks, and after N days of fooling around i'm heartily sick of it.

what i want is some thing that lurks in the background and after 12
minutes of inactivity, kills the shell process dead-like-dinner. 

suggestions?