# 2.11BSD#431 - /usr/src/usr.bin/uucp/xqt.c

##### Functions

    xuucico           X
    xuucp             X
    xuuxqt            X

##### Variables

    LocalOnly         X

##### Macros

    fork              X

       1: #ifndef lint
       2: static char sccsid[] = "@(#)xqt.c	5.3 (Berkeley) 6/23/85";
       3: #endif
       4:
       5: #include <signal.h>
       6: #include "uucp.h"
       7:
       8: int LocalOnly = 0;
       9:
      10: /*LINTLIBRARY*/
      11:
      12: /*
      13:  *	start up uucico for rmtname
      14:  *
      15:  *	return codes:  none
      16:  */
      17:
      18: #ifdef  VMS
      19: #define fork    vfork
      20: #endif VMS
      21:
      22: xuucico(rmtname)
      23: char *rmtname;
      24: {
      25:     if (fork() == 0) {
      26:         /*  start uucico for rmtname system  */
      27:         char opt[100];
      28:         close(0);
      29:         close(1);
      30:         close(2);
      31:         open(DEVNULL, 0);
      32:         open(DEVNULL, 1);
      33:         open(DEVNULL, 1);
      34:         signal(SIGINT, SIG_IGN);
      35:         signal(SIGHUP, SIG_IGN);
      36:         signal(SIGQUIT, SIG_IGN);
      37:         signal(SIGKILL, SIG_IGN);
      38:         if (rmtname[0] != '\0')
      39:             sprintf(opt, "-s%s", rmtname);
      40:         else
      41:             opt[0] = '\0';
      42: #ifndef VMS
      43:         if (LocalOnly)
      44:             execl(UUCICO, "uucico", "-r1", "-L", opt, (char *)0);
      45:         else
      46:             execl(UUCICO, "uucico", "-r1", opt, (char *)0);
      47: #else   VMS
      48:         /* Under VMS/EUNICE release the batch job */
      49:         if (LocalOnly)
      50:             execl(STARTUUCP, "startuucp", "uucico", "-r1", "-L", opt, (char *)0);
      51:         else
      52:             execl(STARTUUCP, "startuucp", "uucico", "-r1", opt, (char *)0);
      53: #endif	VMS
      54:         exit(100);
      55:     }
      56: #ifdef  VMS
      57:     while(wait(0) != -1)
      58:         ;   /* Wait for it to finish!! */
      59: #endif	VMS
      60:     return;
      61: }
      62:
      63:
      64: /*
      65:  *	start up uuxqt
      66:  *
      67:  *	return codes:  none
      68:  */
      69:
      70: xuuxqt()
      71: {
      72:     if (fork() == 0) {
      73:         /*  start uuxqt  */
      74:         close(0);
      75:         close(1);
      76:         close(2);
      77:         open(DEVNULL, 2);
      78:         open(DEVNULL, 2);
      79:         open(DEVNULL, 2);
      80:         signal(SIGINT, SIG_IGN);
      81:         signal(SIGHUP, SIG_IGN);
      82:         signal(SIGQUIT, SIG_IGN);
      83:         signal(SIGKILL, SIG_IGN);
      84:         execl(UUXQT, "UUXQT",  (char *)0);
      85:         exit(100);
      86:     }
      87:     return;
      88: }
      89:
      90: xuucp(str)
      91: char *str;
      92: {
      93:     char text[300];
      94:     if (fork() == 0) {
      95:         /*  start uucp  */
      96:         close(0);
      97:         close(1);
      98:         close(2);
      99:         open(DEVNULL, 0);
     100:         open(DEVNULL, 1);
     101:         open(DEVNULL, 1);
     102:         signal(SIGINT, SIG_IGN);
     103:         signal(SIGHUP, SIG_IGN);
     104:         signal(SIGQUIT, SIG_IGN);
     105:         signal(SIGKILL, SIG_IGN);
     106:         sprintf(text, "%s -r %s", UUCP, str);
     107:         execl(SHELL, "sh", "-c", text, CNULL);
     108:         exit(100);
     109:     }
     110:     sleep(15);  /* Give uucp chance to finish */
     111:     return;
     112: }

#### Defined functions

xuucico defined in line 22; used 6 times

- in /usr/src/usr.bin/uucp/cico.c line 381
- in /usr/src/usr.bin/uucp/uucp.c line 181
- in /usr/src/usr.bin/uucp/uupoll.c line 70
- in /usr/src/usr.bin/uucp/uux.c line 416, 433
- in /usr/src/usr.bin/uucp/uuxqt.c line 377

xuucp defined in line 90; used 1 times

- in /usr/src/usr.bin/uucp/cntrl.c line 371

xuuxqt defined in line 70; used 3 times

- in /usr/src/usr.bin/uucp/cico.c line 713
- in /usr/src/usr.bin/uucp/cntrl.c line 451
- in /usr/src/usr.bin/uucp/uux.c line 418

#### Defined variables

LocalOnly defined in line 8; used 4 times

- in line 43, 49
- in /usr/src/usr.bin/uucp/cico.c line 155
- in /usr/src/usr.bin/uucp/conn.c line 119

sccsid defined in line 2; never used

#### Defined macros

fork defined in line 19; used 3 times

- in line 25, 72, 94

Last modified: 1987-02-17 Generated: 2016-12-26 | Generated by src2html V0.67 page hit count: 722 |