Hi Ken,
but ALSO uses dup2() to make an additional copy of the input file
descriptor to descriptor 3 (!). Does anyone know why? It looks like
it has always done this.
It's not the only one, e.g. docs/historical/mh-6.8.5/uip/post.c has
2622 if (fd != 0)
2623 (void) dup2 (fd, 0);
2624 (void) freopen ("/dev/null", "w", stdout);
2625 (void) freopen ("/dev/null", "w", stderr);
2626 if (fd != 3) /* backwards compatible... */
2627 (void) dup2 (fd, 3);
2628 closefds (4);
Note the comment.
--
Cheers, Ralph.
--
nmh-workers
https://lists.nongnu.org/mailman/listinfo/nmh-workers