Fix process detach on Linux, #2126.