gwenhywfar 5.10.1
Macros | Functions
process_all.c File Reference
#include "process_l.h"
#include <gwenhywfar/process.h>
#include <gwenhywfar/gwenhywfarapi.h>
#include <gwenhywfar/misc.h>
#include <gwenhywfar/debug.h>
#include <unistd.h>
#include <time.h>
Include dependency graph for process_all.c:

Go to the source code of this file.

Macros

#define DISABLE_DEBUGLOG
 

Functions

int GWEN_Process_RunCommandWaitAndGather (const char *prg, const char *args, GWEN_BUFFER *stdOutBuffer, GWEN_BUFFER *stdErrBuffer)
 

Macro Definition Documentation

◆ DISABLE_DEBUGLOG

#define DISABLE_DEBUGLOG

Definition at line 15 of file process_all.c.

Function Documentation

◆ GWEN_Process_RunCommandWaitAndGather()

int GWEN_Process_RunCommandWaitAndGather ( const char *  prg,
const char *  args,
GWEN_BUFFER stdOutBuffer,
GWEN_BUFFER stdErrBuffer 
)

Start a process which executes the given command with the given arguments, and gathers stdout of the process into the given buffer (if any).

Your application needs to install a signal handler which catches SIGCHLD.

Returns
result of the command (negative value: GWEN error code)
Parameters
prgname of the binary to run
argsarguments for the command (all in one string, words separated by blanks)
stdOutBufferbuffer to receive stdout from the started process

Definition at line 31 of file process_all.c.

References DBG_INFO, GWEN_ERROR_GENERIC, GWEN_ERROR_NOT_SUPPORTED, GWEN_LOGDOMAIN, GWEN_Process_AddFlags(), GWEN_PROCESS_FLAGS_REDIR_STDERR, GWEN_PROCESS_FLAGS_REDIR_STDOUT, GWEN_Process_free(), GWEN_Process_GetResult(), GWEN_Process_new(), GWEN_Process_Start(), GWEN_Process_WaitAndRead(), and GWEN_ProcessStateRunning.

Referenced by _callPkgConfig(), _checkVersion(), GWB_Tools_CheckCompilerArgs(), GWB_Tools_TryCompile(), and GWB_Tools_TryLink().

Here is the call graph for this function:
Here is the caller graph for this function: