Ticket #3495: boost-1.35.0-ppid-endless-loop.patch

File boost-1.35.0-ppid-endless-loop.patch, 758 bytes (added by Eduard Hein <eduard_hein@…>, 13 years ago)
  • boost/test/impl/debug.ipp

    From: Ralf Horstmann <ralf_horstmann@mcafee.com>
    
    Some vserver kernel emulate the init process in a way that ppid
    of process 1 is 1. This lets the debugger search function go into
    an endless loop.
    
    Since pid 1 is unlikely to be a debugger, we can safely ignore
    pid 1 and just quit searching when we reach pid 1 instead of 0.
    ---
    
    old new under_debugger()  
    644644
    645645    pid_t pid = ::getpid();
    646646
    647     while( pid != 0 ) {
     647    while( pid != 0 && pid != 1 ) {
    648648        process_info pi( pid );
    649649
    650650        // !! ?? should we use tokenizer here instead?