Typedefs | |
typedef struct _Ecore_Fork_Cb | Ecore_Fork_Cb |
Functions | |
EAPI int | ecore_init (void) |
Set up connections, signal handlers, sockets etc. More... | |
EAPI int | ecore_shutdown (void) |
Shut down connections, signal handlers sockets etc. More... | |
EAPI Eina_Bool | ecore_fork_reset_callback_add (Ecore_Cb func, const void *data) |
Add a function to be called by ecore_fork_reset() More... | |
EAPI Eina_Bool | ecore_fork_reset_callback_del (Ecore_Cb func, const void *data) |
This removes the callback specified. More... | |
EAPI void | ecore_fork_reset (void) |
Reset the ecore internal state after a fork. More... | |
Variables | |
static int | fork_cbs_walking = 0 |
static Eina_List * | fork_cbs = NULL |
int ecore_init | ( | void | ) |
Set up connections, signal handlers, sockets etc.
This function sets up all singal handlers and the basic event loop. If it succeeds, 1 will be returned, otherwise 0 will be returned.
References EAPI, ecore_animator_add(), ecore_main_loop_glib_integrate(), ecore_timer_add(), eina_init(), eina_log_domain_register(), EINA_LOG_ERR, eina_log_timing(), eina_prefix_new(), eina_shutdown(), evil_init(), evil_shutdown(), and unsetenv().
Referenced by ecore_audio_init(), ecore_con_init(), ecore_evas_init(), ecore_file_init(), ecore_imf_init(), ecore_wl_init(), ecore_x_init(), edje_init(), eeze_init(), efreet_init(), efreet_mime_init(), eio_init(), eldbus_init(), and emotion_object_extension_may_play_get().
int ecore_shutdown | ( | void | ) |
Shut down connections, signal handlers sockets etc.
Do not call this function from any callback that may be called from the main loop, as the main loop will then fall over and not function properly.
References EAPI, ecore_timer_del(), eina_log_domain_unregister(), eina_log_timing(), eina_prefix_free(), eina_shutdown(), and evil_shutdown().
Referenced by ecore_audio_init(), ecore_audio_shutdown(), ecore_con_init(), ecore_con_shutdown(), ecore_evas_init(), ecore_evas_shutdown(), ecore_file_shutdown(), ecore_imf_init(), ecore_imf_shutdown(), ecore_wl_init(), ecore_wl_server_mode_set(), ecore_x_double_click_time_get(), ecore_x_init(), edje_init(), eeze_init(), eeze_shutdown(), efreet_init(), efreet_mime_init(), efreet_mime_shutdown(), efreet_shutdown(), eio_shutdown(), eldbus_init(), eldbus_shutdown(), and emotion_object_extension_may_play_get().
Add a function to be called by ecore_fork_reset()
This queues func
to be called (and passed data
as its argument) when ecore_fork_reset() is called. This allows other libraries and subsystems to also reset their internal state after a fork.
References EAPI, EINA_FALSE, eina_list_append(), and EINA_TRUE.
Referenced by ecore_evas_init().
This removes the callback specified.
This deletes the callback added by ecore_fork_reset_callback_add() using the function and data pointer to specify which to remove.
References EAPI, EINA_FALSE, EINA_LIST_FOREACH, eina_list_remove_list(), and EINA_TRUE.
Referenced by ecore_evas_shutdown().
EAPI void ecore_fork_reset | ( | void | ) |
Reset the ecore internal state after a fork.
Ecore maintains internal data that can be affected by the fork() system call which creates a duplicate of the current process. This also duplicates file descriptors which is problematic in that these file descriptors still point to their original sources. This function makes ecore reset internal state (e.g. pipes used for signalling between threads) so they function correctly afterwards.
It is highly suggested that you call this function after any fork() system call inside the child process if you intend to use ecore features after this point and not call any exec() family functions. Not doing so will cause possible misbehaviour.
References EAPI, ecore_pipe_add(), ecore_pipe_del(), ecore_pipe_write(), EINA_LIST_FOREACH, EINA_LIST_FOREACH_SAFE, eina_list_remove_list(), and unsetenv().