I don't know why (or how) it could work before r19775, though. This fixes the wrong return code from wait_for_thread() in most cases, and thus, bug #1011. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20060 a95241bf-73f2-0310-859d-f6bbb57e9c96