Implemented, but not testing fork handling.

This update checks in a rough implementation of the full fork handling
algorithm.  These changes are untested.