More ecore_exe naming break'n'fix. Should be all done now.

SVN revision: 19832
This commit is contained in:
David Walter Seikel 2006-01-15 11:27:19 +00:00
parent 7252101aa3
commit e109255415
5 changed files with 37 additions and 36 deletions

View File

@ -24,7 +24,7 @@ Ecore_Exe *exe3 = NULL;
static int static int
exe_data(void *data, int type, void *event) exe_data(void *data, int type, void *event)
{ {
Ecore_Event_Exe_Data *ev; Ecore_Exe_Event_Data *ev;
int i; int i;
ev = event; ev = event;
@ -51,7 +51,7 @@ exe_data(void *data, int type, void *event)
static int static int
exe_data_count(void *data, int type, void *event) exe_data_count(void *data, int type, void *event)
{ {
Ecore_Event_Exe_Data *ev; Ecore_Exe_Event_Data *ev;
int i; int i;
ev = event; ev = event;
@ -82,7 +82,7 @@ exe_data_count(void *data, int type, void *event)
static int static int
exe_exit(void *data, int type, void *event) exe_exit(void *data, int type, void *event)
{ {
Ecore_Event_Exe_Exit *ev; Ecore_Exe_Event_Del *ev;
ev = event; ev = event;
printf(" [*] EXE EXIT: %p\n", ev->exe); printf(" [*] EXE EXIT: %p\n", ev->exe);

View File

@ -108,34 +108,17 @@ extern "C" {
typedef void Ecore_Event; /**< A handle for an event */ typedef void Ecore_Event; /**< A handle for an event */
typedef void Ecore_Animator; /**< A handle for animators */ typedef void Ecore_Animator; /**< A handle for animators */
#endif #endif
typedef struct _Ecore_Exe_Event_Add Ecore_Exe_Event_Add; /**< Spawned Exe add event */
typedef struct _Ecore_Event_Exe_Exit Ecore_Event_Exe_Exit; /**< Spawned Exe exit event */
typedef struct _Ecore_Event_Signal_User Ecore_Event_Signal_User; /**< User signal event */ typedef struct _Ecore_Event_Signal_User Ecore_Event_Signal_User; /**< User signal event */
typedef struct _Ecore_Event_Signal_Hup Ecore_Event_Signal_Hup; /**< Hup signal event */ typedef struct _Ecore_Event_Signal_Hup Ecore_Event_Signal_Hup; /**< Hup signal event */
typedef struct _Ecore_Event_Signal_Exit Ecore_Event_Signal_Exit; /**< Exit signal event */ typedef struct _Ecore_Event_Signal_Exit Ecore_Event_Signal_Exit; /**< Exit signal event */
typedef struct _Ecore_Event_Signal_Power Ecore_Event_Signal_Power; /**< Power signal event */ typedef struct _Ecore_Event_Signal_Power Ecore_Event_Signal_Power; /**< Power signal event */
typedef struct _Ecore_Event_Signal_Realtime Ecore_Event_Signal_Realtime; /**< Realtime signal event */ typedef struct _Ecore_Event_Signal_Realtime Ecore_Event_Signal_Realtime; /**< Realtime signal event */
typedef struct _Ecore_Event_Exe_Data_Line Ecore_Event_Exe_Data_Line; /**< Lines from a child process */ typedef struct _Ecore_Exe_Event_Add Ecore_Exe_Event_Add; /**< Spawned Exe add event */
typedef struct _Ecore_Event_Exe_Data Ecore_Event_Exe_Data; /**< Data from a child process */ typedef struct _Ecore_Exe_Event_Del Ecore_Exe_Event_Del; /**< Spawned Exe exit event */
typedef struct _Ecore_Exe_Event_Data_Line Ecore_Exe_Event_Data_Line; /**< Lines from a child process */
typedef struct _Ecore_Exe_Event_Data Ecore_Exe_Event_Data; /**< Data from a child process */
#ifndef WIN32 #ifndef WIN32
struct _Ecore_Exe_Event_Add /** Process add event */
{
Ecore_Exe *exe; /**< The handle to the added process */
void *ext_data; /**< Extension data - not used */
};
struct _Ecore_Event_Exe_Exit /** Process exit event */
{
pid_t pid; /**< The process ID of the process that exited */
int exit_code; /**< The exit code of the process */
Ecore_Exe *exe; /**< The handle to the exited process, or NULL if not found */
int exit_signal; /** < The signal that caused the process to exit */
char exited : 1; /** < set to 1 if the process exited of its own accord */
char signalled : 1; /** < set to 1 id the process exited due to uncaught signal */
void *ext_data; /**< Extension data - not used */
siginfo_t data; /**< Signal info */
};
#endif #endif
struct _Ecore_Event_Signal_User /** User signal event */ struct _Ecore_Event_Signal_User /** User signal event */
@ -188,18 +171,36 @@ extern "C" {
}; };
#ifndef WIN32 #ifndef WIN32
struct _Ecore_Event_Exe_Data_Line /**< Lines from a child process */ struct _Ecore_Exe_Event_Add /** Process add event */
{
Ecore_Exe *exe; /**< The handle to the added process */
void *ext_data; /**< Extension data - not used */
};
struct _Ecore_Exe_Event_Del /** Process exit event */
{
pid_t pid; /**< The process ID of the process that exited */
int exit_code; /**< The exit code of the process */
Ecore_Exe *exe; /**< The handle to the exited process, or NULL if not found */
int exit_signal; /** < The signal that caused the process to exit */
char exited : 1; /** < set to 1 if the process exited of its own accord */
char signalled : 1; /** < set to 1 id the process exited due to uncaught signal */
void *ext_data; /**< Extension data - not used */
siginfo_t data; /**< Signal info */
};
struct _Ecore_Exe_Event_Data_Line /**< Lines from a child process */
{ {
char *line; char *line;
int size; int size;
}; };
struct _Ecore_Event_Exe_Data /** Data from a child process event */ struct _Ecore_Exe_Event_Data /** Data from a child process event */
{ {
Ecore_Exe *exe; /**< The handle to the process */ Ecore_Exe *exe; /**< The handle to the process */
void *data; /**< the raw binary data from the child process that was recieved */ void *data; /**< the raw binary data from the child process that was recieved */
int size; /**< the size of this data in bytes */ int size; /**< the size of this data in bytes */
Ecore_Event_Exe_Data_Line *lines; /**< a NULL terminated array of line data if line buffered */ Ecore_Exe_Event_Data_Line *lines; /**< a NULL terminated array of line data if line buffered */
}; };
#endif #endif

View File

@ -459,16 +459,16 @@ _ecore_event_call(void)
void * void *
_ecore_event_exe_exit_new(void) _ecore_event_exe_exit_new(void)
{ {
Ecore_Event_Exe_Exit *e; Ecore_Exe_Event_Del *e;
e = calloc(1, sizeof(Ecore_Event_Exe_Exit)); e = calloc(1, sizeof(Ecore_Exe_Event_Del));
return e; return e;
} }
void void
_ecore_event_exe_exit_free(void *data __UNUSED__, void *ev) _ecore_event_exe_exit_free(void *data __UNUSED__, void *ev)
{ {
Ecore_Event_Exe_Exit *e; Ecore_Exe_Event_Del *e;
e = ev; e = ev;
if (e->exe) _ecore_exe_free(e->exe); if (e->exe) _ecore_exe_free(e->exe);

View File

@ -1034,9 +1034,9 @@ _ecore_exe_data_generic_handler(void *data, Ecore_Fd_Handler *fd_handler, Ecore_
{ /* No more data to read. */ { /* No more data to read. */
if (inbuf) if (inbuf)
{ {
Ecore_Event_Exe_Data *e; Ecore_Exe_Event_Data *e;
e = calloc(1, sizeof(Ecore_Event_Exe_Data)); e = calloc(1, sizeof(Ecore_Exe_Event_Data));
if (e) if (e)
{ {
e->exe = exe; e->exe = exe;
@ -1060,7 +1060,7 @@ _ecore_exe_data_generic_handler(void *data, Ecore_Fd_Handler *fd_handler, Ecore_
{ {
/* In testing, the lines seem to arrive in batches of 500 to 1000 lines at most, roughly speaking. */ /* In testing, the lines seem to arrive in batches of 500 to 1000 lines at most, roughly speaking. */
max += 10; /* FIXME: Maybe keep track of the largest number of lines ever sent, and add half that many instead of 10. */ max += 10; /* FIXME: Maybe keep track of the largest number of lines ever sent, and add half that many instead of 10. */
e->lines = realloc(e->lines, sizeof(Ecore_Event_Exe_Data_Line) * (max + 1)); /* Allow room for the NULL termination. */ e->lines = realloc(e->lines, sizeof(Ecore_Exe_Event_Data_Line) * (max + 1)); /* Allow room for the NULL termination. */
} }
/* raster said to leave the line endings as line endings, however - /* raster said to leave the line endings as line endings, however -
* This is line buffered mode, we are not dealing with binary here, but lines. * This is line buffered mode, we are not dealing with binary here, but lines.
@ -1224,7 +1224,7 @@ _ecore_exe_flush(Ecore_Exe *exe)
static void static void
_ecore_exe_event_exe_data_free(void *data __UNUSED__, void *ev) _ecore_exe_event_exe_data_free(void *data __UNUSED__, void *ev)
{ {
Ecore_Event_Exe_Data *e; Ecore_Exe_Event_Data *e;
e = ev; e = ev;

View File

@ -162,7 +162,7 @@ _ecore_signal_call(void)
while ((pid = waitpid(-1, &status, WNOHANG)) > 0) while ((pid = waitpid(-1, &status, WNOHANG)) > 0)
{ {
Ecore_Event_Exe_Exit *e; Ecore_Exe_Event_Del *e;
/* FIXME: If this process is set respawn, respawn with a suitable backoff /* FIXME: If this process is set respawn, respawn with a suitable backoff
* period for those that need too much respawning. * period for those that need too much respawning.
@ -498,7 +498,7 @@ _ecore_signal_callback_sigrt(int sig, siginfo_t *si, void *foo __UNUSED__)
static int static int
_ecore_signal_exe_exit_delay(void *data) _ecore_signal_exe_exit_delay(void *data)
{ {
Ecore_Event_Exe_Exit *e; Ecore_Exe_Event_Del *e;
e = data; e = data;
if (e) if (e)