home *** CD-ROM | disk | FTP | other *** search
/ Source Code 1992 March / Source_Code_CD-ROM_Walnut_Creek_March_1992.iso / usenet / compsrcs / misc / volume06 / redir.unp < prev    next >
Encoding:
Internet Message Format  |  1991-08-27  |  1.3 KB

  1. From decwrl!ucbvax!ucsd!sdcsvax!ucsdhub!esosun!seismo!uunet!allbery Fri Mar 24 22:22:30 PST 1989
  2. Article 804 of comp.sources.misc:
  3. Path: decwrl!ucbvax!ucsd!sdcsvax!ucsdhub!esosun!seismo!uunet!allbery
  4. From: allbery@uunet.UU.NET (Brandon S. Allbery - comp.sources.misc)
  5. Newsgroups: comp.sources.misc
  6. Subject: v06i040: patches for "redir"
  7. Message-ID: <49803@uunet.UU.NET>
  8. Date: 25 Feb 89 19:22:01 GMT
  9. Sender: allbery@uunet.UU.NET
  10. Reply-To: djk@munnari.UUCP
  11. Lines: 30
  12. Approved: allbery@uunet.UU.NET (Brandon S. Allbery - comp.sources.misc)
  13.  
  14. Posting-number: Volume 6, Issue 40
  15. Submitted-by: djk@munnari.UUCP
  16. Archive-name: redir.unpat1
  17.  
  18. [Unofficial patches; keep the original in case the author posts official ones.
  19. ++bsa]
  20.  
  21. { Something seems to have munged the tabs on v06i031 before they got to uunet.
  22. I had to unexpand -a, and manually expand a couple of unexpand's mistakes. }
  23.  
  24. Here are some improvements to make "redir" a bit more robust:
  25.  
  26. *** redir.c    Mon Feb  6 19:06:28 1989
  27. --- redir.new.c    Mon Feb  6 19:02:33 1989
  28. ***************
  29. *** 151,154 ****
  30. --- 151,161 ----
  31.       close(fd);
  32.       }
  33. +     if (argv[optind] == NULL) {
  34. +     fprintf(stderr, USAGESTRING, argv[0]);
  35. +         exit(1);
  36. +     }
  37.       execvp(argv[optind], argv + optind);
  38. +     fprintf(stderr, "%s: ", argv[0]);
  39. +     perror(argv[optind]);
  40.   }
  41.  
  42.         David Keegel    (djk%munnari.oz.AU@uunet.UU.NET)
  43.  
  44.  
  45.