setsid only fails with EPERM, and it only fails if we&#39;re already<br>the process leader (which is what would happen if it succeeded).<br><br>Patch attached to prevent tab damage<br>