Linux: consolidate dup2 implementation
commit33ef940302eba1ecf9e98376557af75d7d9c0ed1
authorAdhemerval Zanella Netto <adhemerval.zanella@linaro.org>
Wed, 19 Oct 2022 22:14:08 +0000 (19 19:14 -0300)
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>
Wed, 7 Dec 2022 14:27:01 +0000 (7 11:27 -0300)
treedc5311765d93b4460a0bc65c9d7ae6ff6da81f50
parent1001abfa14d5289236dcca740ab72ec4d1fa5352
Linux: consolidate dup2 implementation

Use dup2 syscall if defined, otherwise use dup3.

Checked on x86_64-linux-gnu.
Reviewed-by: Carlos O'Donell <carlos@redhat.com>
Tested-by: Carlos O'Donell <carlos@redhat.com>
sysdeps/unix/sysv/linux/dup2.c [moved from sysdeps/unix/sysv/linux/generic/dup2.c with 83% similarity]