Diff for /parser3/src/main/pa_exec.C between versions 1.51.4.1 and 1.57

version 1.51.4.1, 2003/09/24 14:32:06 version 1.57, 2004/02/11 15:33:15
Line 1 Line 1
 /** @file  /** @file
         Parser: program executing for different OS-es.          Parser: program executing for different OS-es.
   
         Copyright(c) 2000,2001-2003 ArtLebedev Group(http://www.artlebedev.com)          Copyright(c) 2000,2001-2004 ArtLebedev Group(http://www.artlebedev.com)
         Author: Alexandr Petrosian <paf@design.ru> (http://paf.design.ru)          Author: Alexandr Petrosian <paf@design.ru> (http://paf.design.ru)
   
         @todo setrlimit          @todo setrlimit
 */  */
   
 static const char* IDENT_EXEC_C="$Date$";  static const char * const IDENT_EXEC_C="$Date$";
   
 #include "pa_config_includes.h"  #include "pa_config_includes.h"
   
Line 316  static void append_env_pair(HashStringSt Line 316  static void append_env_pair(HashStringSt
   
 /// @todonow unix part to smart_ptr  /// @todonow unix part to smart_ptr
 PA_exec_result pa_exec(  PA_exec_result pa_exec(
                         bool forced_allow,                           bool 
   #if defined(NO_PA_EXEC) || defined(PA_SAFE_MODE)
                           forced_allow
   #endif
                           , 
                         const String& file_spec,                           const String& file_spec, 
                         const HashStringString* env,                           const HashStringString* env, 
                         const ArrayString& argv,                           const ArrayString& argv, 
Line 330  PA_exec_result pa_exec( Line 334  PA_exec_result pa_exec(
                         "parser execs are disabled [recompile parser without --disable-execs configure option]");                          "parser execs are disabled [recompile parser without --disable-execs configure option]");
 #endif  #endif
   
         // execve needs non const  
         char* file_spec_cstr=file_spec.cstrm(String::L_FILE_SPEC);   
 #ifdef WIN32  #ifdef WIN32
   
         PROCESS_INFORMATION pi;           PROCESS_INFORMATION pi; 
         HANDLE hInWrite, hOutRead, hErrRead;          HANDLE hInWrite, hOutRead, hErrRead;
         const char* cmd=buildCommand(file_spec.cstr(String::L_FILE_SPEC), argv);          const char* cmd=buildCommand(file_spec.cstr(String::L_FILE_SPEC), argv);
         char* env_cstr;          char* env_cstr=0;
         if(env) {          if(env) {
                 String string;                  String string;
                 Append_env_pair_info info(string);                  Append_env_pair_info info(string);
Line 359  PA_exec_result pa_exec( Line 361  PA_exec_result pa_exec(
                           
                 throw Exception(0,                  throw Exception(0,
                         &file_spec,                          &file_spec,
                         "exec failed - %s (%ld). Consider adding shbang line (#!x:\\interpreter\\command line)",                           "exec failed - %s (%u). Consider adding shbang line (#!x:\\interpreter\\command line)", 
                                 error_size?szErrorDesc:"<unknown>", (long)error);                                  error_size?szErrorDesc:"<unknown>", error);
         } else {          } else {
                 const char* in_cstr=in.cstr();                  const char* in_cstr=in.cstr();
                 DWORD written_size;                  DWORD written_size;
Line 386  from http://www.apache.org/websrc/cvsweb Line 388  from http://www.apache.org/websrc/cvsweb
   
 #else  #else
   
           // execve needs non const
           char* file_spec_cstr=file_spec.cstrm(String::L_FILE_SPEC); 
   
         int pipe_write, pipe_read, pipe_err;          int pipe_write, pipe_read, pipe_err;
   
 #ifdef PA_SAFE_MODE  #ifdef PA_SAFE_MODE

Removed from v.1.51.4.1  
changed lines
  Added in v.1.57


E-mail: