[BACK]Return to ox_launch.c CVS log [TXT][DIR] Up to [local] / OpenXM_contrib2 / asir2018 / io

Diff for /OpenXM_contrib2/asir2018/io/ox_launch.c between version 1.1 and 1.4

version 1.1, 2018/09/19 05:45:08 version 1.4, 2019/12/14 12:34:02
Line 44 
Line 44 
  * OF THE SOFTWARE HAS BEEN DEVELOPED BY A THIRD PARTY, THE THIRD PARTY   * OF THE SOFTWARE HAS BEEN DEVELOPED BY A THIRD PARTY, THE THIRD PARTY
  * DEVELOPER SHALL HAVE NO LIABILITY IN CONNECTION WITH THE USE,   * DEVELOPER SHALL HAVE NO LIABILITY IN CONNECTION WITH THE USE,
  * PERFORMANCE OR NON-PERFORMANCE OF THE SOFTWARE.   * PERFORMANCE OR NON-PERFORMANCE OF THE SOFTWARE.
  * $OpenXM$   * $OpenXM: OpenXM_contrib2/asir2018/io/ox_launch.c,v 1.3 2019/12/13 14:40:50 fujimoto Exp $
 */  */
 #include <setjmp.h>  #include <setjmp.h>
 #include <signal.h>  #include <signal.h>
Line 52 
Line 52 
 #include "ca.h"  #include "ca.h"
 #include "com.h"  #include "com.h"
 #include "ox.h"  #include "ox.h"
 #include "gc.h"  // #include "gc.h"
 #if defined(VISUAL) || defined(__MINGW32__)  #if defined(VISUAL) || defined(__MINGW32__)
 #include <stdlib.h>  #include <stdlib.h>
 #include <windows.h>  #include <windows.h>
Line 75  HANDLE hIntr,hReset,hKill;
Line 75  HANDLE hIntr,hReset,hKill;
 extern int _fileinfo;  extern int _fileinfo;
 #endif  #endif
   
   void GC_init();
 static void put_log(char *);  static void put_log(char *);
 static int ox_spawn(char *,int,char *,char *);  static int ox_spawn(char *,int,char *,char *);
 static void launch_error(char *);  static void launch_error(char *);
Line 98  char *str;
Line 99  char *str;
   static FILE *logfile;    static FILE *logfile;
   
   if ( !logfile )    if ( !logfile )
   #if defined(ANDROID)
       logfile = fopen("/data/data/com.termux/files/usr/tmp/ox_log","w");
   #else
     logfile = fopen("/tmp/ox_log","w");      logfile = fopen("/tmp/ox_log","w");
   #endif
   fprintf(logfile,"%s\n",str);    fprintf(logfile,"%s\n",str);
   fflush(logfile);    fflush(logfile);
 }  }
Line 330  char *nolog;
Line 335  char *nolog;
     if ( bs != 4 && dup2(bs,4) != 4 )      if ( bs != 4 && dup2(bs,4) != 4 )
       exit(1);        exit(1);
     {      {
 #if defined(linux) || defined(__NeXT__) || defined(ultrix) || defined(__CYGWIN__)  #if defined(ANDROID)
   #include <sys/resource.h>
         struct rlimit rl;
   
         getrlimit(RLIMIT_NOFILE,&rl);
         close(0);
         for ( i = 5; i < rl.rlim_cur; i++ )
           close(i);
   #elif defined(linux) || defined(__NeXT__) || defined(ultrix) || defined(__CYGWIN__)
 #include <sys/param.h>  #include <sys/param.h>
       close(0);        close(0);
       for ( i = 5; i < NOFILE; i++ )        for ( i = 5; i < NOFILE; i++ )

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.4

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