[BACK]Return to ext.c CVS log [TXT][DIR] Up to [local] / OpenXM / src / kan96xx / Kan

Diff for /OpenXM/src/kan96xx/Kan/ext.c between version 1.13 and 1.14

version 1.13, 2002/11/10 07:00:05 version 1.14, 2003/07/14 12:49:52
Line 1 
Line 1 
 /* $OpenXM: OpenXM/src/kan96xx/Kan/ext.c,v 1.12 2002/10/24 05:19:50 takayama Exp $ */  /* $OpenXM: OpenXM/src/kan96xx/Kan/ext.c,v 1.13 2002/11/10 07:00:05 takayama Exp $ */
 #include <stdio.h>  #include <stdio.h>
 #include <sys/types.h>  #include <sys/types.h>
 #include <sys/stat.h>  #include <sys/stat.h>
Line 14 
Line 14 
 #include "plugin.h"  #include "plugin.h"
 #include <ctype.h>  #include <ctype.h>
   
   extern char **environ;
   
 #define MYCP_SIZE 100  #define MYCP_SIZE 100
 static int Mychildren[MYCP_SIZE];  static int Mychildren[MYCP_SIZE];
 static int Mycp = 0;  static int Mycp = 0;
Line 203  struct object Kextension(struct object obj)
Line 205  struct object Kextension(struct object obj)
   }else if (strcmp(key,"forkExec")==0) {    }else if (strcmp(key,"forkExec")==0) {
     if (size != 4) errorKan1("%s\n","[(forkExec) argList fdList sigblock] extension.");      if (size != 4) errorKan1("%s\n","[(forkExec) argList fdList sigblock] extension.");
     obj1 = getoa(obj,1);      obj1 = getoa(obj,1);
           if (obj1.tag == Sdollar) {
             obj1 = KstringToArgv(obj1);
           }
     if (obj1.tag != Sarray) errorKan1("%s\n","[(forkExec) argList fdList sigblock] extension. array argList.");      if (obj1.tag != Sarray) errorKan1("%s\n","[(forkExec) argList fdList sigblock] extension. array argList.");
     obj2 = getoa(obj,2);          obj2 = getoa(obj,2);
     if (obj2.tag != Sarray) errorKan1("%s\n","[(forkExec) argList fdList sigblock] extension. array fdList.");      if (obj2.tag != Sarray) errorKan1("%s\n","[(forkExec) argList fdList sigblock] extension. array fdList.");
     obj3 = getoa(obj,3);      obj3 = getoa(obj,3);
     if (obj3.tag != Sinteger) errorKan1("%s\n","[(forkExec) argList fdList sigblock] extension. integer sigblock.");      if (obj3.tag != Sinteger) errorKan1("%s\n","[(forkExec) argList fdList sigblock] extension. integer sigblock.");
Line 255  struct object Kextension(struct object obj)
Line 260  struct object Kextension(struct object obj)
         sleep(5);          sleep(5);
         fprintf(stderr,">>>\n");          fprintf(stderr,">>>\n");
       }        }
       execv(argv[0],argv);        execve(argv[0],argv,environ);
       /* This place will never be reached unless execv fails. */        /* This place will never be reached unless execv fails. */
       fprintf(stderr,"forkExec fails: ");        fprintf(stderr,"forkExec fails: ");
       for (i=0; i<argListc; i++) {        for (i=0; i<argListc; i++) {

Legend:
Removed from v.1.13  
changed lines
  Added in v.1.14

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>