1: #ifndef lint
   2: static char sccsid[] = "@(#)xqt.c	5.1 (Berkeley) 7/2/83";
   3: #endif
   4: 
   5: #include "uucp.h"
   6: #include <signal.h>
   7: 
   8: /*******
   9:  *	xuucico(rmtname)		start up uucico for rmtname
  10:  *	char *rmtname;
  11:  *
  12:  *	return codes:  none
  13:  */
  14: 
  15: xuucico(rmtname)
  16: char *rmtname;
  17: {
  18:     if (fork() == 0) {
  19:         /*  start uucico for rmtname system  */
  20:         char opt[100];
  21:         close(0);
  22:         close(1);
  23:         close(2);
  24:         open("/dev/null", 0);
  25:         open("/dev/null", 1);
  26:         open("/dev/null", 1);
  27:         signal(SIGINT, SIG_IGN);
  28:         signal(SIGHUP, SIG_IGN);
  29:         signal(SIGQUIT, SIG_IGN);
  30:         signal(SIGKILL, SIG_IGN);
  31:         if (rmtname[0] != '\0')
  32:             sprintf(opt, "-s%.7s", rmtname);
  33:         else
  34:             opt[0] = '\0';
  35:         execl(UUCICO, "UUCICO", "-r1", opt, (char *)0);
  36:         exit(100);
  37:     }
  38:     return;
  39: }
  40: 
  41: 
  42: /*******
  43:  *	xuuxqt()		start up uuxqt
  44:  *
  45:  *	return codes:  none
  46:  */
  47: 
  48: xuuxqt()
  49: {
  50:     if (fork() == 0) {
  51:         /*  start uuxqt  */
  52:         close(0);
  53:         close(1);
  54:         close(2);
  55:         open("/dev/null", 2);
  56:         open("/dev/null", 2);
  57:         open("/dev/null", 2);
  58:         signal(SIGINT, SIG_IGN);
  59:         signal(SIGHUP, SIG_IGN);
  60:         signal(SIGQUIT, SIG_IGN);
  61:         signal(SIGKILL, SIG_IGN);
  62:         execl(UUXQT, "UUXQT",  (char *)0);
  63:         exit(100);
  64:     }
  65:     return;
  66: }
  67: xuucp(str)
  68: char *str;
  69: {
  70:     char text[300];
  71:     if (fork() == 0) {
  72:         /*  start uucp  */
  73:         close(0);
  74:         close(1);
  75:         close(2);
  76:         open("/dev/null", 0);
  77:         open("/dev/null", 1);
  78:         open("/dev/null", 1);
  79:         signal(SIGINT, SIG_IGN);
  80:         signal(SIGHUP, SIG_IGN);
  81:         signal(SIGQUIT, SIG_IGN);
  82:         signal(SIGKILL, SIG_IGN);
  83:         sprintf(text, "%s -r %s", UUCP, str);
  84:         execl(SHELL, "sh", "-c", text, (char *)0);
  85:         exit(100);
  86:     }
  87:     sleep(15);  /* Give uucp chance to finish */
  88:     return;
  89: }

Defined functions

xuucp defined in line 67; used 1 times
xuuxqt defined in line 48; used 3 times

Defined variables

sccsid defined in line 2; never used
Last modified: 1983-07-03
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 856
Valid CSS Valid XHTML 1.0 Strict