我在网上搜索了这个主题,看到了以下的代码和解释,但我无法理解其背后的思想。以下是代码和解释:
#include <unistd.h>
...
int pfd;
...
close(1);
dup(pfd);
close(pfd); //** LINE F **//
...
/*The example above closes standard output for the current
processes,re-assigns standard output to go to the file referenced by pfd,
and closes the original file descriptor to clean up.*/
LINE F是什么?为什么它至关重要?