I am working on an application (written in python, but that hardly matters) several parts of which involves communications over the net via ppp on a standard modem connection. The relevant areas of the application all include a server thread which distributes net based tasks to a collection of worker threads that process tasks from a job queue. There is an inherent problem that the link may go down either due to ISP action or a failure of one form or another in the WAN. Also there is the problem that the link may stay up but be inactive due to some failure in the WAN. I want to detect and resolve such problems. What I'd like to do is to have the server thread (which after setting up the job queue does little but wait for completion of the worker threads) periodically test the status of the connection and in the event of a problem re-establish the connection (which will generally involve being assigned a new IP) and signal the worker threads so that they can re-establish theiir TCP connection and continue or restart their active task as required. Their are clearly many methods to determine the status of the network. My current thinking is to parse /proc/net/route to ensure that ppp0 is still the default route and then send an ICMP echo request to each registered DNS server until either one replies or all time out. I'm wondering if anyone has any comments on this approach or perhaps betetr ideas. -- Regards, John Bell, BCM Research -- Psyche-list mailing list Psyche-list@redhat.com https://listman.redhat.com/mailman/listinfo/psyche-list