v06i040: patches for "redir"
Brandon S. Allbery - comp.sources.misc
allbery at uunet.UU.NET
Sun Feb 26 05:22:01 AEST 1989
Posting-number: Volume 6, Issue 40
Submitted-by: djk at munnari.UUCP
Archive-name: redir.unpat1
[Unofficial patches; keep the original in case the author posts official ones.
++bsa]
{ Something seems to have munged the tabs on v06i031 before they got to uunet.
I had to unexpand -a, and manually expand a couple of unexpand's mistakes. }
Here are some improvements to make "redir" a bit more robust:
*** redir.c Mon Feb 6 19:06:28 1989
--- redir.new.c Mon Feb 6 19:02:33 1989
***************
*** 151,154 ****
--- 151,161 ----
close(fd);
}
+
+ if (argv[optind] == NULL) {
+ fprintf(stderr, USAGESTRING, argv[0]);
+ exit(1);
+ }
execvp(argv[optind], argv + optind);
+ fprintf(stderr, "%s: ", argv[0]);
+ perror(argv[optind]);
}
David Keegel (djk%munnari.oz.AU at uunet.UU.NET)
More information about the Comp.sources.misc
mailing list