Allow get-stdin to exit gracefully.

Signed-off-by: Bao Haojun <baohaojun@gmail.com>