/* * RUN.C * * Steve Drew 24-sep-86 * version 2.01A (Manx ver) by Steve Drew 27 Sep 1986 * mods for 16 bit compiling 4 Oct 1986. Steve Drew. * */ #include "shell.h" do_run(str) char *str; { int i; #if USE_FEXEC struct CommandLineInterface *cli; av[ac] = '\0'; i = fexecv(av[0],&av[0]); /* the next few lines solve a bug with fexecv and bcpl programs */ /* that muck up the input/output streams which causes GURUs */ cli = (struct CommandLineInterface *)((long)Myprocess->pr_CLI << 2); Myprocess->pr_CIS = cli->cli_StandardInput; Myprocess->pr_COS = cli->cli_StandardOutput; if (i) { fprintf(stderr,"Command not found :%s\n",av[0]); return(-1); } return(wait()); #endif #if USE_EXECUTE i = Execute(str, 0L, 0L); return ((i) ? 0 : -1); #endif }