Exit with correct return code in split environment.