switch to using socketpair instead of pipe if possible. This fixes the