don't create pts is not a terminal

Signed-off-by: Fuang.Cao <cavan.cfa@gmail.com>