Make function mhRunServerLoop return error code.