Make selfpipe more flexible.