--- parser3/src/main/pa_exec.C 2024/11/26 00:34:09 1.103 +++ parser3/src/main/pa_exec.C 2026/10/03 14:30:03 1.107 @@ -1,7 +1,7 @@ /** @file Parser: program executing for different OS-es. - Copyright (c) 2001-2024 Art. Lebedev Studio (http://www.artlebedev.com) + Copyright (c) 2001-2026 Art. Lebedev Studio (https://www.artlebedev.com) Authors: Konstantin Morshnev , Alexandr Petrosian @todo setrlimit @@ -13,7 +13,7 @@ #include "pa_exception.h" #include "pa_common.h" -volatile const char * IDENT_PA_EXEC_C="$Id: pa_exec.C,v 1.103 2024/11/26 00:34:09 moko Exp $" IDENT_PA_EXEC_H; +volatile const char * IDENT_PA_EXEC_C="$Id: pa_exec.C,v 1.107 2026/10/03 14:30:03 moko Exp $" IDENT_PA_EXEC_H; #ifdef _MSC_VER @@ -81,7 +81,7 @@ static DWORD CreateHiddenConsoleProcess( char dir[MAX_STRING]; pa_strncpy(dir, szScriptFileSpec, MAX_STRING); lsplit(dir,' '); // trim arguments - rsplit(dir,'/'); rsplit(dir,'\\'); // trim filename + rsplit(dir,"/\\"); // trim filename // Create a child process (suspended) fCreated=CreateProcess(NULL, @@ -315,7 +315,7 @@ static pid_t execve_piped(const char* fi char dir[MAX_STRING]; pa_strncpy(dir, file_spec_cstr, MAX_STRING); rsplit(dir,'/'); // trim filename - chdir(dir); + PA_UNUSED int ignore_result=chdir(dir); // execute execve(file_spec_cstr, argv, env); @@ -472,7 +472,7 @@ PA_exec_result pa_exec(bool forced_allow if(!forced_allow) { struct stat finfo; if(pa_stat(file_spec_cstr, &finfo)!=0) - throw Exception("file.missing", &file_spec, "stat failed: %s (%d), actual filename '%s'", strerror(errno), errno, file_spec_cstr); + throw Exception("file.missing", &file_spec, "stat failed: %s (%d)%s", strerror(errno), errno, actual_filename(file_spec, file_spec_cstr)); check_safe_mode(finfo, file_spec, file_spec_cstr); } @@ -502,7 +502,7 @@ PA_exec_result pa_exec(bool forced_allow if(pid>0) { // in child if(in.length>0) // there is some in data - write(pipe_write, in.str, in.length); + PA_UNUSED int ignore_result=write(pipe_write, in.str, in.length); close(pipe_write); read_pipe(result.out, pipe_read); close(pipe_read);