Ich versuche die Verwendung von dup2und zu verstehen dup. Von der Manpage: DESCRIPTION dup and dup2 create a copy of the file descriptor oldfd. After successful return of dup or dup2, the old and new descriptors may be used interchangeably. They share locks, file position pointers and flags;...