Support --terminate option