<div dir='auto'><div class="gmail_extra" dir="auto"><div class="gmail_quote">On Jun 1, 2017 4:39 AM, RĂ©mi Denis-Courmont <remi@remlab.net> wrote:<blockquote class="quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;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 class="gmail_extra" dir="auto"><br></div><div class="gmail_extra" dir="auto">I'll submit a new patch later today.</div></div>