Rearranged setsid call