Work on forking.

Add shutdown resource.
Fix forking (still disabled for now)