<div dir='auto'><div dir="auto" style="font-family: sans-serif; font-size: 13.696px;"><div style="color: purple;">On Jun 1, 2017 4:39 AM, RĂ©mi Denis-Courmont <remi@remlab.net> wrote:<blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb( 204 , 204 , 204 );padding-left:1ex"><p dir="ltr">Hello,</p><p dir="ltr">Closing FD 0 is risky, as a lot of programs assume 0, 1 & 2 are open. Even mv can conditionally use it. Better redirect it from /dev/null if really needed.<br></p></blockquote></div>Now that you mention it, it would probably be best to simply redirect I/O for commands (the while loop and the two echos after it) instead of redirecting stdin/stdout in the first place.</div><div dir="auto" style="font-family: sans-serif; font-size: 13.696px;"><br></div><div dir="auto" style="font-family: sans-serif; font-size: 13.696px;">I'll submit a new patch later today.</div></div>