Annotation of parser3/src/include/pa_exec.h, revision 1.29
1.1 paf 1: /** @file
2: Parser: program executing for different OS-es decls.
3:
1.27 moko 4: Copyright (c) 2000-2026 Art. Lebedev Studio (https://www.artlebedev.com)
1.25 moko 5: Authors: Konstantin Morshnev <moko@design.ru>, Alexandr Petrosian <paf@design.ru>
1.1 paf 6: */
7:
8: #ifndef PA_EXEC_H
9: #define PA_EXEC_H
1.9 paf 10:
1.29 ! moko 11: #define IDENT_PA_EXEC_H "$Id: pa_exec.h,v 1.28 2026/09/27 17:13:40 moko Exp $"
1.1 paf 12:
13: #include "pa_string.h"
14: #include "pa_hash.h"
15: #include "pa_array.h"
1.13 paf 16: #include "pa_value.h"
17: #include "pa_charset.h"
1.28 moko 18: #include "pa_file.h"
1.13 paf 19:
1.29 ! moko 20: /// pid of the active exec child, 0 if none; also its process group id: killed on the response timeout
! 21: extern THREAD_LOCAL int pa_exec_active_pid;
! 22:
1.13 paf 23: struct PA_exec_result {
24: int status; ///< exit code
1.19 misha 25: File_read_result out;
1.16 paf 26: String& err;
1.13 paf 27:
1.19 misha 28: PA_exec_result(): status(0), out(), err(*new String) {}
1.13 paf 29: };
1.1 paf 30:
1.13 paf 31: PA_exec_result pa_exec(
1.8 paf 32: bool forced_allow, ///< allow execution regardles of --disable-execs
33: const String& file_spec,
1.13 paf 34: const HashStringString* env, ///< 0 | Hash of String
35: const ArrayString& argv, ///< 0 | Array of command line arguments
1.22 moko 36: String::C in);
1.1 paf 37:
38: #endif
E-mail: