Why not use pipes for piping? e.g. print du("*", "-sb") | sort("-rn")
Figuring out a way around this (mocking up an fd to pass to sort at instantiation time that blocks until stdout on du is available) is left as an exercise to the reader. I've already said too much. ;)