This is an automated email from the git hooks/post-receive script.

git pushed a commit to branch master
in repository edi.

View the commit online.

commit 848c9d140ff0a4e6fa25f635a505250cb1c9ebfa
Author: Alastair Poole <[email protected]>
AuthorDate: Mon May 11 17:03:50 2026 +0100

    edi_exe: avoid losing a core to a thread.
    
    I don't have the time to investigate this further.
    
    This is a hack but it's not too bad. I'm not going to let 0.9
    release losing a core due to some logic error.
    
    Signed off by: [email protected]
---
 src/lib/edi_exe.c | 19 ++++++++++++++++---
 1 file changed, 16 insertions(+), 3 deletions(-)

diff --git a/src/lib/edi_exe.c b/src/lib/edi_exe.c
index f9d0c31..14b48f0 100644
--- a/src/lib/edi_exe.c
+++ b/src/lib/edi_exe.c
@@ -17,6 +17,7 @@
 typedef struct _Edi_Exe_Args {
    void ((*func)(int, void *));
    void *data;
+   char *name;
    pid_t pid;
    Ecore_Event_Handler *handler;
 } Edi_Exe_Args;
@@ -38,10 +39,21 @@ _edi_exe_notify_client_data_cb(void *data, int type EINA_UNUSED, void *event EIN
 
    ecore_con_client_send(ev->client, status, sizeof(int));
 
-   free(args);
-
    srv = ecore_con_client_server_get(ev->client);
-   ecore_con_server_del(srv);
+   ecore_con_server_flush(srv);
+
+   // ecore_con_server_del(srv);
+   char *address = ecore_con_local_path_new(EINA_FALSE, (char *) args->name, 0);
+   if ((address) && (ecore_file_exists(address)))
+     {
+        /* FIXME: If we just delete the server here we spin at 100% on a core
+         * indefinitely. This is a hack, but I'm not happy losing a core like
+         * that.
+         */
+        ecore_file_remove(address);
+     }
+   free(args->name);
+   free(args);
 
    return ECORE_CALLBACK_DONE;
 }
@@ -59,6 +71,7 @@ edi_exe_notify_handle(const char *name, void ((*func)(int, void *)), void *data)
    args = malloc(sizeof(Edi_Exe_Args));
    args->func = func;
    args->data = ""
+   args->name = strdup(name);
    args->handler = ecore_event_handler_add(ECORE_CON_EVENT_CLIENT_DATA, (Ecore_Event_Handler_Cb) _edi_exe_notify_client_data_cb, args);
 
    return EINA_TRUE;

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.

Reply via email to