Invalid ports should exit with 1