purge redundant code
[WIP] improve redirection
[WIP] improve redirection
[WIP] close_fds
[WIP] improve redirection
slightly changed
improve parse_redirection
fixed compile error
[WIP]