libamxp  1.4.0
Patterns C Implementation
amxp_subproc.h File Reference

Ambiorix sub-proccess API header file. More...

#include <sys/types.h>
#include <amxc/amxc_llist.h>
#include <amxp/amxp_signal.h>

Go to the source code of this file.

Data Structures

struct  _subproc_t
 Child process information structure. More...
 

Typedefs

typedef struct _subproc_t amxp_subproc_t
 Child process information structure. More...
 

Functions

int amxp_subproc_new (amxp_subproc_t **subproc)
 Constructor function, creates a new child process data structure. More...
 
int amxp_subproc_delete (amxp_subproc_t **subproc)
 Destructor function, deletes a child process data structure. More...
 
int amxp_subproc_open_fd (amxp_subproc_t *subproc, int requested)
 Opens standard file descriptor to the child process. More...
 
int amxp_subproc_vstart (amxp_subproc_t *const subproc, char **argv)
 Start a child process. More...
 
int amxp_subproc_start (amxp_subproc_t *const subproc, char *cmd,...)
 Start a child process. More...
 
int amxp_subproc_astart (amxp_subproc_t *const subproc, amxc_array_t *cmd)
 Start a child process. More...
 
int amxp_subproc_kill (const amxp_subproc_t *const subproc, const int sig)
 Sends a Linux signal to the child process. More...
 
int amxp_subproc_wait (amxp_subproc_t *subproc, int timeout_msec)
 Waits until the child process has stopped. More...
 
int amxp_subproc_vstart_wait (amxp_subproc_t *subproc, int timeout_msec, char **cmd)
 Starts a child process and waits until it exits. More...
 
int amxp_subproc_start_wait (amxp_subproc_t *subproc, int timeout_msec, char *cmd,...)
 Starts a child process and waits until it exits. More...
 
amxp_subproc_tamxp_subproc_find (const int pid)
 Retrieve a amxp_subproc_t for a child process using it's process identifier. More...
 
pid_t amxp_subproc_get_pid (const amxp_subproc_t *const subproc)
 Get the PID of a child process. More...
 
amxp_signal_mngr_tamxp_subproc_get_sigmngr (const amxp_subproc_t *const subproc)
 Get the Signal managers of the child process. More...
 
bool amxp_subproc_is_running (const amxp_subproc_t *const subproc)
 Checks if the child process is running. More...
 
int amxp_subproc_ifexited (amxp_subproc_t *subproc)
 Checks if the child process terminated normally. More...
 
int amxp_subproc_ifsignaled (amxp_subproc_t *subproc)
 Checks if the child process was stopped because of an uncaught Linux signal. More...
 
int amxp_subproc_get_exitstatus (amxp_subproc_t *subproc)
 Gets the exit code of the child process. More...
 
int amxp_subproc_get_termsig (amxp_subproc_t *subproc)
 Gets the Linux signal id that caused the child process to stop. More...
 

Detailed Description

Ambiorix sub-proccess API header file.

Definition in file amxp_subproc.h.