update documentation of writepid, and expose the handler for user's need.