#8975 NORM Not Tri: thread.interrupt_main() unreliability

Zarro Boogs per Child bugtracker at laptop.org
Mon Nov 17 04:30:37 EST 2008


#8975: thread.interrupt_main() unreliability
------------------------------------+---------------------------------------
           Reporter:  ssb22         |       Owner:               
               Type:  defect        |      Status:  new          
           Priority:  normal        |   Milestone:  Not Triaged  
          Component:  not assigned  |     Version:  not specified
         Resolution:                |    Keywords:               
        Next_action:  never set     |    Verified:  0            
Deployment_affected:                |   Blockedby:               
           Blocking:                |  
------------------------------------+---------------------------------------

Comment(by ssb22):

 Note that this is OLPC-specific; in general Python code it is probably not
 a good idea to write os.kill(os.getpid(), signal.SIGINT) instead of
 thread.interrupt_main() because, even if hasattr(os,"kill") and
 hasattr(os,"getpid"), this can fail on systems that run threads in
 multiple processes.  For example I confirmed it fails on my old Debian
 Sarge box with Linux kernel 2.4.  As I haven't been able to reproduce this
 on any system other than the OLPC, I recommend using os.kill(os.getpid(),
 signal.SIGINT) if and only if we're running on OLPC (e.g. if olpc module
 is successfully imported).

-- 
Ticket URL: <http://dev.laptop.org/ticket/8975#comment:1>
One Laptop Per Child <http://laptop.org/>
OLPC bug tracking system


More information about the Bugs mailing list