support pipe stdio to parent
refactor pipe stdio