///********************/ ///* demo_dup2 : ... */ ///********************/ # include # include # include # define ENTREE_STANDARD 0 int main() { int descr_group; char c; descr_group = open ("/etc/passwd", O_RDONLY); dup2 (descr_group, ENTREE_STANDARD);/// retour a tester ... c = getchar(); while (c != EOF) { putchar(c); c = getchar(); } return 0; }