home *** CD-ROM | disk | FTP | other *** search
- /*
- * execm.c
- *
- * This program is a substitute for Xenix's /usr/lib/mail/execmail.
- *
- * Written by Chip Salzenberg (chip@ateng.UUCP).
- * Released to Usenet on 01 Dec 1987.
- *
- * Do what you want with it; I'm not responsible for lost mail,
- * but I don't expect that this little program will lose anything.
- */
-
- #include <stdio.h>
-
- main(argc, argv)
- int argc;
- char **argv;
- {
- char *progname = argv[0];
-
- /*
- * Drop the execmail options.
- */
- while (argv[1][0] == '-')
- {
- switch (argv[1][1])
- {
- case 'f':
- case 'h':
- argv += 2;
- break;
- default:
- ++argv;
- break;
- }
- }
-
- argv[0] = progname;
- execv("/usr/bin/smail", argv);
- execv("/bin/smail", argv);
-
- fprintf(stderr, "%s: can't execute smail!\n", progname);
- exit(1);
- }
-