Subject: bug#31332: touch unnecessarily calls dup2

From: Paul Eggert <[email-masked]>
Date: Mon, 29 Oct 2018 22:38:36 -0700

John Steele Scott wrote:
> Prior tohttp://git.savannah.gnu.org/gitweb/?p=coreutils.git;a=commitdiff;h=e373bb19  fd_reopen() initially did "close(desired_fd); fd = open(...)" which would always do the right thing

No, as the old code did the wrong thing for "touch /dev/stdin", whereas the 
current code works.