/* Generated by zi2c from process_run_linux.zi. */ #ifndef ZIRAN_PROCESS_RUN_LINUX_H #define ZIRAN_PROCESS_RUN_LINUX_H #include #include "zir_string_types.h" #include "zir_slice.h" #include "c_string.h" #include "vec.h" #ifdef __cplusplus extern "C" { #endif #ifdef ZIRAN_PROCESS_RUN_LINUX_H_PRIVATE #define CLOSE_ON_EXEC 524288 #endif #ifdef ZIRAN_PROCESS_RUN_LINUX_H_PRIVATE #define zir_d_f22e9a1471997af5 4 #endif typedef struct ProcessArgumentSlot ProcessArgumentSlot; typedef struct ProcessOptions ProcessOptions; #ifndef ZIRAN_CONCRETE_FORWARD___type_838711075b90279a #define ZIRAN_CONCRETE_FORWARD___type_838711075b90279a typedef struct __type_838711075b90279a __type_838711075b90279a; #endif typedef struct ProcessRun ProcessRun; #ifndef ZIRAN_CONCRETE_FORWARD___type_01e5ac0505e23acf #define ZIRAN_CONCRETE_FORWARD___type_01e5ac0505e23acf typedef struct __type_01e5ac0505e23acf __type_01e5ac0505e23acf; #endif #ifndef ZIRAN_CONCRETE_FORWARD___type_1f00ef809eed7c2e #define ZIRAN_CONCRETE_FORWARD___type_1f00ef809eed7c2e typedef struct __type_1f00ef809eed7c2e __type_1f00ef809eed7c2e; #endif #ifdef ZIRAN_PROCESS_RUN_LINUX_H_PRIVATE typedef struct Prepared Prepared; #endif #ifdef ZIRAN_PROCESS_RUN_LINUX_H_PRIVATE typedef void (*SignalHandler)(int32_t); #endif struct ProcessArgumentSlot { uint8_t* value; }; struct ProcessOptions { Slice arguments; String directory; Slice environment; String input_path; String output_path; bool append_output; String error_path; bool merge_error; bool capture_output; bool new_session; }; #ifndef ZIRAN_CONCRETE___type_838711075b90279a #define ZIRAN_CONCRETE___type_838711075b90279a struct __type_838711075b90279a { uint8_t* data; int64_t count; int64_t capacity; }; #endif struct ProcessRun { int32_t pid; int32_t code; bool started; bool finished; __type_838711075b90279a output; }; #ifndef ZIRAN_CONCRETE___type_01e5ac0505e23acf #define ZIRAN_CONCRETE___type_01e5ac0505e23acf struct __type_01e5ac0505e23acf { ProcessArgumentSlot* data; int64_t count; int64_t capacity; }; #endif #ifndef ZIRAN_CONCRETE___type_1f00ef809eed7c2e #define ZIRAN_CONCRETE___type_1f00ef809eed7c2e struct __type_1f00ef809eed7c2e { int64_t* data; int64_t count; int64_t capacity; }; #endif #ifdef ZIRAN_PROCESS_RUN_LINUX_H_PRIVATE struct Prepared { __type_838711075b90279a bytes; __type_01e5ac0505e23acf arguments; __type_1f00ef809eed7c2e argument_offsets; __type_1f00ef809eed7c2e names; __type_1f00ef809eed7c2e values; int64_t directory; int64_t input; int64_t output; int64_t error; }; #endif bool process_run_linux_StartProcess(ProcessOptions options, ProcessRun* run); bool process_run_linux_PollProcess(ProcessRun* run); bool process_run_linux_WaitProcess(ProcessRun* run); bool process_run_linux_SignalProcess(ProcessRun* run, int32_t signal_number, bool whole_group); bool process_run_linux_RunProcess(ProcessOptions options, ProcessRun* run); void process_run_linux_CatchTermination(void); bool process_run_linux_TerminationRequested(void); #ifdef __cplusplus } #endif #endif /* ZIRAN_PROCESS_RUN_LINUX_H */