forked from enlightenment/efl
parent
cf29de295c
commit
d08ccf6fa6
|
@ -99,7 +99,7 @@ int timer_once(void *data)
|
||||||
int i = 1;
|
int i = 1;
|
||||||
|
|
||||||
ecore_app_args_get(&argc, &argv);
|
ecore_app_args_get(&argc, &argv);
|
||||||
ecore_event_handler_add(ECORE_EVENT_EXE_DATA, exe_data_count, NULL);
|
ecore_event_handler_add(ECORE_EXE_EVENT_DATA, exe_data_count, NULL);
|
||||||
printf("FILE : %s\n", argv[i]);
|
printf("FILE : %s\n", argv[i]);
|
||||||
exe0 = ecore_exe_pipe_run("/bin/cat", ECORE_EXE_PIPE_WRITE | ECORE_EXE_PIPE_READ | ECORE_EXE_PIPE_READ_LINE_BUFFERED, NULL);
|
exe0 = ecore_exe_pipe_run("/bin/cat", ECORE_EXE_PIPE_WRITE | ECORE_EXE_PIPE_READ | ECORE_EXE_PIPE_READ_LINE_BUFFERED, NULL);
|
||||||
|
|
||||||
|
@ -137,11 +137,11 @@ int main(int argc, char **argv)
|
||||||
ecore_app_args_set(argc, (const char **) argv);
|
ecore_app_args_set(argc, (const char **) argv);
|
||||||
|
|
||||||
ecore_init();
|
ecore_init();
|
||||||
ecore_event_handler_add(ECORE_EVENT_EXE_EXIT, exe_exit, NULL);
|
ecore_event_handler_add(ECORE_EXE_EVENT_DEL, exe_exit, NULL);
|
||||||
|
|
||||||
if (argc == 1)
|
if (argc == 1)
|
||||||
{
|
{
|
||||||
ecore_event_handler_add(ECORE_EVENT_EXE_DATA, exe_data, NULL);
|
ecore_event_handler_add(ECORE_EXE_EVENT_DATA, exe_data, NULL);
|
||||||
exe0 = ecore_exe_run("/bin/uname -a", NULL);
|
exe0 = ecore_exe_run("/bin/uname -a", NULL);
|
||||||
if (exe0) exe_count++;
|
if (exe0) exe_count++;
|
||||||
|
|
||||||
|
|
|
@ -62,14 +62,14 @@ extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define ECORE_EVENT_NONE 0
|
#define ECORE_EVENT_NONE 0
|
||||||
#define ECORE_EVENT_EXE_EXIT 1 /**< Spawned Exe has exit event */
|
#define ECORE_EXE_EVENT_DEL 1 /**< Spawned Exe has exit event */
|
||||||
#define ECORE_EVENT_SIGNAL_USER 2 /**< User signal event */
|
#define ECORE_EVENT_SIGNAL_USER 2 /**< User signal event */
|
||||||
#define ECORE_EVENT_SIGNAL_HUP 3 /**< Hup signal event */
|
#define ECORE_EVENT_SIGNAL_HUP 3 /**< Hup signal event */
|
||||||
#define ECORE_EVENT_SIGNAL_EXIT 4 /**< Exit signal event */
|
#define ECORE_EVENT_SIGNAL_EXIT 4 /**< Exit signal event */
|
||||||
#define ECORE_EVENT_SIGNAL_POWER 5 /**< Power signal event */
|
#define ECORE_EVENT_SIGNAL_POWER 5 /**< Power signal event */
|
||||||
#define ECORE_EVENT_SIGNAL_REALTIME 6 /**< Realtime signal event */
|
#define ECORE_EVENT_SIGNAL_REALTIME 6 /**< Realtime signal event */
|
||||||
#define ECORE_EVENT_EXE_DATA 7 /**< Data from a child process */
|
#define ECORE_EXE_EVENT_DATA 7 /**< Data from a child process */
|
||||||
#define ECORE_EVENT_EXE_ERROR 8 /**< Error from a child process */
|
#define ECORE_EXE_EVENT_ERROR 8 /**< Error from a child process */
|
||||||
#define ECORE_EVENT_COUNT 9
|
#define ECORE_EVENT_COUNT 9
|
||||||
|
|
||||||
#ifndef _ECORE_PRIVATE_H
|
#ifndef _ECORE_PRIVATE_H
|
||||||
|
|
|
@ -232,10 +232,10 @@ ecore_exe_run(const char *exe_cmd, const void *data)
|
||||||
* This function does the same thing as ecore_exe_run(), but also makes the
|
* This function does the same thing as ecore_exe_run(), but also makes the
|
||||||
* standard in and/or out as wel las stderr from the child process available
|
* standard in and/or out as wel las stderr from the child process available
|
||||||
* for reading or writing. To write use ecore_exe_send(). To read listen to
|
* for reading or writing. To write use ecore_exe_send(). To read listen to
|
||||||
* ECORE_EVENT_EXE_DATA or ECORE_EVENH_EXE_ERROR events (set up handlers).
|
* ECORE_EXE_EVENT_DATA or ECORE_EXE_EVENT_ERROR events (set up handlers).
|
||||||
* Ecore may buffer read and error data until a newline character if asked
|
* Ecore may buffer read and error data until a newline character if asked
|
||||||
* for with the @p flags. All data will be included in the events (newlines
|
* for with the @p flags. All data will be included in the events (newlines
|
||||||
* will be replaced with NULLS if line buffered). ECORE_EVENT_EXE_DATA events
|
* will be replaced with NULLS if line buffered). ECORE_EXE_EVENT_DATA events
|
||||||
* will only happen if the process is run with ECORE_EXE_PIPE_READ enabled
|
* will only happen if the process is run with ECORE_EXE_PIPE_READ enabled
|
||||||
* in the flags. The same with the error version. Writing will only be
|
* in the flags. The same with the error version. Writing will only be
|
||||||
* allowed with ECORE_EXE_PIPE_WRITE enabled in the flags.
|
* allowed with ECORE_EXE_PIPE_WRITE enabled in the flags.
|
||||||
|
@ -951,7 +951,7 @@ _ecore_exe_data_generic_handler(void *data, Ecore_Fd_Handler *fd_handler, Ecore_
|
||||||
if (flags & ECORE_FD_READ)
|
if (flags & ECORE_FD_READ)
|
||||||
{
|
{
|
||||||
flags = ECORE_FD_READ;
|
flags = ECORE_FD_READ;
|
||||||
event_type = ECORE_EVENT_EXE_DATA;
|
event_type = ECORE_EXE_EVENT_DATA;
|
||||||
child_fd = exe->child_fd_read;
|
child_fd = exe->child_fd_read;
|
||||||
if (exe->flags & ECORE_EXE_PIPE_READ_LINE_BUFFERED)
|
if (exe->flags & ECORE_EXE_PIPE_READ_LINE_BUFFERED)
|
||||||
is_buffered = 1;
|
is_buffered = 1;
|
||||||
|
@ -959,7 +959,7 @@ _ecore_exe_data_generic_handler(void *data, Ecore_Fd_Handler *fd_handler, Ecore_
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
flags = ECORE_FD_ERROR;
|
flags = ECORE_FD_ERROR;
|
||||||
event_type = ECORE_EVENT_EXE_ERROR;
|
event_type = ECORE_EXE_EVENT_ERROR;
|
||||||
child_fd = exe->child_fd_error;
|
child_fd = exe->child_fd_error;
|
||||||
if (exe->flags & ECORE_EXE_PIPE_ERROR_LINE_BUFFERED)
|
if (exe->flags & ECORE_EXE_PIPE_ERROR_LINE_BUFFERED)
|
||||||
is_buffered = 1;
|
is_buffered = 1;
|
||||||
|
|
|
@ -217,7 +217,7 @@ _ecore_signal_call(void)
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (e->exe) printf("Sending exit event for %s.\n", e->exe->cmd);
|
if (e->exe) printf("Sending exit event for %s.\n", e->exe->cmd);
|
||||||
_ecore_event_add(ECORE_EVENT_EXE_EXIT, e,
|
_ecore_event_add(ECORE_EXE_EVENT_DEL, e,
|
||||||
_ecore_event_exe_exit_free, NULL);
|
_ecore_event_exe_exit_free, NULL);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -504,7 +504,7 @@ _ecore_signal_exe_exit_delay(void *data)
|
||||||
if (e)
|
if (e)
|
||||||
{
|
{
|
||||||
printf("Sending delayed exit event for %s.\n", e->exe->cmd);
|
printf("Sending delayed exit event for %s.\n", e->exe->cmd);
|
||||||
_ecore_event_add(ECORE_EVENT_EXE_EXIT, e,
|
_ecore_event_add(ECORE_EXE_EVENT_DEL, e,
|
||||||
_ecore_event_exe_exit_free, NULL);
|
_ecore_event_exe_exit_free, NULL);
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
|
|
Loading…
Reference in New Issue