Killing a thread

jonathan allen booth jbooth at ux4.cso.uiuc.edu
Mon Jul 19 21:50:31 EDT 1999


>From what I looked at trying to figure out my [similar] problem... What
about imposing resource limits on the child thread (can you do that by
thread?), then catching the signal that gets thrown when it exceeds max
CPU time, and then using that to exit the thread?

catlee at my-deja.com wrote:
: I'm writing a progrma where some user code is executed in a restricted
: environment running in a separate thread.  Now, if the user is
: malicious, s/he can just put 'while 1: 1+1'.  I'd like to be able to
: recover from this.  Is there any way I can kill the thread that is stuck
: in the infinite loop?

-- 
Jonathan A. Booth				kamikaze at N0$PAMimsa.edu
http://www.N0$PAMimsa.edu/~kamikaze		jbooth at N0$PAMuiuc.edu
Remove NOSPAM from hostnames. Unsolicited commercial e-mail: access denied




More information about the Python-list mailing list