home *** CD-ROM | disk | FTP | other *** search
-
- /*
- * UUPOLL -- call a UUCP connect site
- *
- * $Header: Beta:src/uucp/src/uucico/RCS/uupoll.c,v 1.1 90/02/02 11:56:15 dillon Exp Locker: dillon $
- *
- * Usage: UUPOLL <system-name>
- *
- * Copyright 1988 by William Loftus. All rights reserved.
- *
- * ARPA: wpl@prc.unisys.com
- * UUCP: wpl@burdvax.UUCP
- * USMAIL: Unisys/Paoli Research Center;PO BOX 517;Paoli, PA 19301-0517
- *
- */
-
- #include <stdio.h>
- #include <stdlib.h>
- #include <string.h>
- #include "version.h"
-
- #define LOCK_FILE "t:UUCP.LCK"
-
- #define TRUE 1
- #define FALSE 0
-
- IDENT(".03");
-
- CXBRK()
- {
- return(0);
- }
-
- void
- main (argc, argv)
- int argc;
- char ** argv;
- {
- static char buf[256];
-
- if (argc != 2) {
- printf("Usage: UUPOLL <system-name>\n");
- exit(1);
- }
-
- if (access(LOCK_FILE,0) != -1) {
- printf("UUCP is locked.\n");
- exit(0);
- }
-
- if (is_in_L_sys_file(argv[1])) {
- sprintf(buf, "run >nil: <nil: UUCICO -s%s\n", argv[1]);
- if (system(buf) == -1) {
- printf("Error spawning task to call system \"%s\"\n", argv[1]);
- }
- } else {
- printf("System \"%s\" not in L.sys file.\n", argv[1]);
- }
- }
-
-
-