Fork+Timeout

Oliver Kurz olku at web.de
Fri Mar 26 04:57:10 EST 2004


Hello,

do someone new how I can do the following?

I call a method which reads from a socket. So ... this method could hang
forever and so my call hangs too ...

So ... I can not change the behavior of this Method, so I have to change my
call.

I though by forking the call to this function and set a timeout to this
call, so my program won't hang forever.

But I don't know how I should do this and if this is the correct/best way to
do this.

Best regards
Oliver





More information about the Python-list mailing list