Enlightenment CVS committal

Author  : raster
Project : e17
Module  : libs/ecore

Dir     : e17/libs/ecore/src/lib/ecore


Modified Files:
        Ecore.h ecore_signal.c 


Log Message:


ALSO report children than exited due to signals... and why... 

===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ecore/src/lib/ecore/Ecore.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -3 -r1.2 -r1.3
--- Ecore.h     23 Sep 2003 08:09:29 -0000      1.2
+++ Ecore.h     12 Oct 2003 05:48:34 -0000      1.3
@@ -47,6 +47,9 @@
        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 */
      };
 
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ecore/src/lib/ecore/ecore_signal.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -3 -r1.2 -r1.3
--- ecore_signal.c      23 Sep 2003 08:09:29 -0000      1.2
+++ ecore_signal.c      12 Oct 2003 05:48:34 -0000      1.3
@@ -87,19 +87,25 @@
        
        while ((pid = waitpid(-1, &status, WNOHANG)) > 0)
          {
-            if (WIFEXITED(status))
+            Ecore_Event_Exe_Exit *e;
+            
+            e = _ecore_event_exe_exit_new();
+            if (e)
               {
-                 Ecore_Event_Exe_Exit *e;
-                 
-                 e = _ecore_event_exe_exit_new();
-                 if (e)
+                 if (WIFEXITED(status))
                    {
                       e->exit_code = WEXITSTATUS(status);
-                      e->pid = pid;
-                      e->exe = _ecore_exe_find(pid);
-                      _ecore_event_add(ECORE_EVENT_EXE_EXIT, e, 
-                                       _ecore_event_exe_exit_free, NULL);
+                      e->exited = 1;
                    }
+                 else if (WIFSIGNALED(status))
+                   {
+                      e->exit_signal = WTERMSIG(status);
+                      e->signalled = 1;
+                   }
+                 e->pid = pid;
+                 e->exe = _ecore_exe_find(pid);
+                 _ecore_event_add(ECORE_EVENT_EXE_EXIT, e, 
+                                  _ecore_event_exe_exit_free, NULL);
               }
          }
        sigchld_count--;




-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
SourceForge.net hosts over 70,000 Open Source Projects.
See the people who have HELPED US provide better services:
Click here: http://sourceforge.net/supporters.php
_______________________________________________
enlightenment-cvs mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to