Ports taken/borrowed from At&T's Plan9.
