Fix process chain handling in spawn

Fixes #3488
Reset SIGPIPE handler in child processes

Allows things like run(`yes` |> `head`) to not hang.