54 #ifndef ERROR_PROCESS_ABORTED
56 #define ERROR_PROCESS_ABORTED 1067L
67 DEPRECATED BU_EXPORT
extern void bu_process_exec(
struct bu_process **info,
const char *cmd,
int argc,
const char **argv,
int out_eql_err,
int hide_window);
78 BU_EXPORT
extern void bu_process_create(
struct bu_process **pinfo,
const char **argv,
int process_creation_opts);
270 BU_EXPORT
int bu_process_args_n(
struct bu_process *pinfo,
const char **cmd,
const char *
const **argv);
288 BU_EXPORT
extern int bu_pid(
void);
Header file for the BRL-CAD common definitions.
int bu_process_fileno(struct bu_process *pinfo, bu_process_io_t d)
Retrieve the file descriptor to the I/O channel associated with the process.
FILE * bu_process_file_open(struct bu_process *pinfo, bu_process_io_t d)
Open and return a FILE pointer associated with the specified channel.
int bu_process_pending(int fd)
determine whether there is data pending on fd
int bu_interactive(void)
detect whether or not a program is being run in interactive mode
void bu_process_create(struct bu_process **pinfo, const char **argv, int process_creation_opts)
Wrapper for creating a sub-process. Allocates bu_process and starts process.
DEPRECATED int bu_terminate(int process)
terminate a given process and any children.
DEPRECATED int bu_process_args(const char **cmd, const char *const **argv, struct bu_process *pinfo)
DEPRECATED FILE * bu_process_open(struct bu_process *pinfo, bu_process_io_t d)
int bu_pid_alive(int pid)
determine whether process is still running using its ID
DEPRECATED int bu_process_id(void)
Return the process ID of the calling process.
int bu_pid(void)
Return the process ID of the calling process.
void bu_process_file_close(struct bu_process *pinfo, bu_process_io_t d)
Close any FILE pointers internally opened via bu_process_open().
int bu_process_read_n(struct bu_process *pinfo, bu_process_io_t d, int n, char *buff)
Read from a process's specified output channel.
DEPRECATED int bu_process_read(char *buff, int *count, struct bu_process *pinfo, bu_process_io_t d, int n)
int bu_process_wait_n(struct bu_process **pinfo, int wtime)
wait for a sub-process to complete, release all process allocations, and release the process itself.
int bu_process_alive(struct bu_process *pinfo)
determine whether process is still running
DEPRECATED void bu_process_close(struct bu_process *pinfo, bu_process_io_t d)
DEPRECATED int bu_process_wait(int *aborted, struct bu_process *pinfo, int wtime)
wait for a sub-process to complete, release all process allocations, and release the process itself.
int bu_process_args_n(struct bu_process *pinfo, const char **cmd, const char *const **argv)
DEPRECATED void bu_process_exec(struct bu_process **info, const char *cmd, int argc, const char **argv, int out_eql_err, int hide_window)
Wrapper for executing a sub-process.
int bu_pid_terminate(int pid)
terminate a given process and any children.
int bu_process_pid(struct bu_process *pinfo)
Return the pid of the subprocess.