exec: support stdin fd being closed
Don't try to dup2() a file descriptor that is already
correct. This can happen if, for example, stdin is closed
and exec redirects stdin from a file, thus opening the input
as file descriptor 0.
Fixes #201
Signed-off-by:
Steve Bennett <steveb@workware.net.au>
parent
bcd44341
Please register or sign in to comment