O
Oldbitcollector
Ok, I've done a couple days worth of searching on this one, and am
stuck. Here's the situation. I have a Linux/PERL script that runs from
inetd when someone telnets to the proper port. I have multiple copies
of this script running at any given time (multi user). When someone
simply drops their end of the connection, the program just stays
running hogging 99% (if it can take it) of the CPU.
I've tried to use alarm(300); while this works, it kills other valid
copies of the program when it drops the one I intended. Because they
all have the same name.
I've considered parsing a copy of "ps -x" to obtain which copies of the
script have been running for more than 5min, but this seems the sloppy
way to go. The nice part of this solution is that a running script
stays around 0:03 while it's under operation, then then starts adding
time after the user drops connection. They are obvious to spot.
Can anyone here provide some direction?
Thanks
Jeff
stuck. Here's the situation. I have a Linux/PERL script that runs from
inetd when someone telnets to the proper port. I have multiple copies
of this script running at any given time (multi user). When someone
simply drops their end of the connection, the program just stays
running hogging 99% (if it can take it) of the CPU.
I've tried to use alarm(300); while this works, it kills other valid
copies of the program when it drops the one I intended. Because they
all have the same name.
I've considered parsing a copy of "ps -x" to obtain which copies of the
script have been running for more than 5min, but this seems the sloppy
way to go. The nice part of this solution is that a running script
stays around 0:03 while it's under operation, then then starts adding
time after the user drops connection. They are obvious to spot.
Can anyone here provide some direction?
Thanks
Jeff