Use a socketpair rather than a pipe in this test so that we can set the buffer size portably.
Work around OSX.
More work-arounds.