date and time created 83/07/02 17:57:57 by sam
authorSam Leffler <sam@ucbvax.Berkeley.EDU>
Sun, 3 Jul 1983 08:57:57 +0000 (00:57 -0800)
committerSam Leffler <sam@ucbvax.Berkeley.EDU>
Sun, 3 Jul 1983 08:57:57 +0000 (00:57 -0800)
SCCS-vsn: usr.bin/uucp/uupoll/uupoll.c 5.1

usr/src/usr.bin/uucp/uupoll/uupoll.c [new file with mode: 0644]

diff --git a/usr/src/usr.bin/uucp/uupoll/uupoll.c b/usr/src/usr.bin/uucp/uupoll/uupoll.c
new file mode 100644 (file)
index 0000000..12a577c
--- /dev/null
@@ -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);
+}