From 2f45b4154af8f4e56d1e8abdeb4622b39c3888a4 Mon Sep 17 00:00:00 2001 From: Sam Leffler Date: Sun, 3 Jul 1983 00:57:57 -0800 Subject: [PATCH] date and time created 83/07/02 17:57:57 by sam SCCS-vsn: usr.bin/uucp/uupoll/uupoll.c 5.1 --- usr/src/usr.bin/uucp/uupoll/uupoll.c | 52 ++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 usr/src/usr.bin/uucp/uupoll/uupoll.c diff --git a/usr/src/usr.bin/uucp/uupoll/uupoll.c b/usr/src/usr.bin/uucp/uupoll/uupoll.c new file mode 100644 index 0000000000..12a577c411 --- /dev/null +++ b/usr/src/usr.bin/uucp/uupoll/uupoll.c @@ -0,0 +1,52 @@ +#ifndef lint +static char sccsid[] = "@(#)uupoll.c 5.1 (Berkeley) %G%"; +#endif + +/* + * Poll named system(s). + * + * The poll occurs even if recent attempts have failed, + * but not if L.sys prohibits the call (e.g. wrong time of day). + * + * AUTHOR + * Tom Truscott (rti!trt) + */ + +#include "uucp.h" + +main(argc, argv) +register int argc; +register char **argv; +{ + if (argc < 2) { + fprintf(stderr, "usage: uupoll system ...\n"); + cleanup(1); + } + + chdir(Spool); + strcpy(Progname, "uupoll"); + uucpname(Myname); + + for (--argc, ++argv; argc > 0; --argc, ++argv) { + if (strcmp(argv[0], Myname) == SAME) { + fprintf(stderr, "This *is* %s!\n", Myname); + continue; + } + + if (versys(argv[0])) { + fprintf(stderr, "%s: unknown system.\n", argv[0]); + continue; + } + /* Remove any STST file that might stop the poll */ + rmstat(argv[0]); + /* Attempt the call */ + xuucico(argv[0]); + } + cleanup(0); +} + +cleanup(code) +int code; +{ + exit(code); +} -- 2.20.1