client: fixed hang on exit when com_pidfile is empty, refs #316