ws_pipe_spawn_*: fix deadlock in g_spawn on Linux with threads