Typedefs | |
| typedef struct _Ecore_Fork_Cb | Ecore_Fork_Cb |
Functions | |
| int | ecore_init (void) |
| Set up connections, signal handlers, sockets etc. | |
| int | ecore_shutdown (void) |
| Shut down connections, signal handlers sockets etc. | |
| Eina_Bool | ecore_fork_reset_callback_add (Ecore_Cb func, const void *data) |
| Add a function to be called by ecore_fork_reset() | |
| Eina_Bool | ecore_fork_reset_callback_del (Ecore_Cb func, const void *data) |
| This removes the callback specified. | |
| void | ecore_fork_reset (void) |
| Reset the ecore internal state after a fork. | |
Variables | |
| static int | fork_cbs_walking = 0 |
| static Eina_List * | fork_cbs = NULL |
Detailed Description
Function Documentation
| int ecore_init | ( | void | ) |
Set up connections, signal handlers, sockets etc.
- Returns
- 1 or greater on success, 0 otherwise
This function sets up all singal handlers and the basic event loop. If it succeeds, 1 will be returned, otherwise 0 will be returned.
- Examples:
- eina_tiler_01.c.
References ecore_animator_add(), ecore_main_loop_glib_integrate(), eina_init(), eina_log_domain_register(), EINA_LOG_ERR, eina_shutdown(), eo_add, eo_init(), eo_shutdown(), evil_init(), and evil_shutdown().
Referenced by ecore_audio_init(), ecore_con_init(), ecore_evas_init(), ecore_file_init(), ecore_imf_init(), ecore_wl_init(), ecore_x_init(), and eio_init().
| int ecore_shutdown | ( | void | ) |
Shut down connections, signal handlers sockets etc.
- Returns
- 0 if ecore shuts down, greater than 0 otherwise. This function shuts down all things set up in ecore_init() and cleans up all event queues, handlers, filters, timers, idlers, idle enterers/exiters etc. set up after ecore_init() was called.
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.
- Examples:
- eina_tiler_01.c.
References eina_log_domain_unregister(), eina_shutdown(), eo_shutdown(), eo_unref(), and evil_shutdown().
Referenced by 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_x_init(), and eio_shutdown().
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.
- Since
- 1.7
References 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.
- Since
- 1.7
References EINA_FALSE, EINA_LIST_FOREACH, eina_list_remove_list(), and EINA_TRUE.
Referenced by ecore_evas_shutdown().
| 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.
- Since
- 1.7
References ecore_pipe_add(), ecore_pipe_del(), ecore_pipe_write(), EINA_LIST_FOREACH, EINA_LIST_FOREACH_SAFE, and eina_list_remove_list().
