Let's verify that everything works the way we expect it to work, hence check setsid() return code. (cherry picked from commit efe42662) (cherry picked from commit 6f9c8af5) (cherry picked from commit a049ddfc) (cherry picked from commit a09947dd)