libcm/cmExec.h
2015-05-22 13:55:38 -07:00

30 linhas
685 B
C

#ifndef cmExec_h
#define cmExec_h
#ifdef __cplusplus
extern "C" {
#endif
enum
{
kOkExRC,
kInvalidPgmFnExRC, // pgmFn was NULL
kForkFailExRC, // internal fork() failed
kExecFailExRC, // internal exec() failed.
kPgmFailExRC, // pgm returned a non-zero exit status
kWaitFailExRC // internal waitpid() failed
};
typedef unsigned cmExRC_t;
// If returnValRef is non-NULL *returnValRef is set to the program return value.
cmExRC_t cmExecV( cmErr_t* err, int* returnValRef, const cmChar_t* pgmFn, va_list vl );
cmExRC_t cmExec( cmErr_t* err, int* returnValRef, const cmChar_t* pgmFn, ... );
#ifdef __cplusplus
}
#endif
#endif