Boost::Test enters endless loop when running in vserver environment
Boost::Test tries to find out if a debugger is attached by iterating through the process tree until ppid 0 is reached. 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. The attached patch implements this.
We observed this bug with standard Debian Lenny vserver host (linux-image-2.6.26-2-vserver-amd64, version 2.6.26-19) running Debian Lenny guest and Centos 5 guest.
Just ignoring 1 won't be enough since on Solaris-Containers pid of init can be any number. See Bug #3481 You have to check for pid == ppid and then abort.
Cheers Ranko Veselinovic