Enlightenment CVS committal

Author  : onefang
Project : e17
Module  : libs/ecore

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


Modified Files:
        Ecore.h ecore_private.h 


Log Message:
Preparation for adding stderr to fork'n'pipe.  The rest cames later tonight.

===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ecore/src/lib/ecore/Ecore.h,v
retrieving revision 1.37
retrieving revision 1.38
diff -u -3 -r1.37 -r1.38
--- Ecore.h     9 Jan 2006 13:36:22 -0000       1.37
+++ Ecore.h     10 Jan 2006 11:15:38 -0000      1.38
@@ -69,7 +69,8 @@
 #define ECORE_EVENT_SIGNAL_POWER    5 /**< Power signal event */
 #define ECORE_EVENT_SIGNAL_REALTIME 6 /**< Realtime signal event */
 #define ECORE_EVENT_EXE_DATA        7 /**< Data from a child process */
-#define ECORE_EVENT_COUNT           8
+#define ECORE_EVENT_EXE_ERRORS      8 /**< Errors from a child process */
+#define ECORE_EVENT_COUNT           9
    
 #ifndef _ECORE_PRIVATE_H   
    enum _Ecore_Fd_Handler_Flags
@@ -82,10 +83,13 @@
    
    enum _Ecore_Exe_Flags /* flags for executing a child with its stdin and/or 
stdout piped back */
      {
-       ECORE_EXE_PIPE_READ = 1, /**< Exe Pipe Read mask */
-       ECORE_EXE_PIPE_WRITE = 2, /**< Exe Pipe Write mask */
-       ECORE_EXE_PIPE_READ_LINE_BUFFERED = 4, /**< Reads are buffered until a 
newline and delivered 1 event per line */
-       ECORE_EXE_RESPAWN = 8 /* FIXME: Exe is restarted if it dies */
+
+   ECORE_EXE_PIPE_READ = 1, /**< Exe Pipe Read mask */
+   ECORE_EXE_PIPE_WRITE = 2, /**< Exe Pipe Write mask */
+   ECORE_EXE_PIPE_ERROR = 4, /**< Exe Pipe error mask */
+   ECORE_EXE_PIPE_READ_LINE_BUFFERED = 8, /**< Reads are buffered until a 
newline and delivered 1 event per line */
+   ECORE_EXE_PIPE_ERROR_LINE_BUFFERED = 16, /**< Errors are buffered until a 
newline and delivered 1 event per line */
+   ECORE_EXE_RESPAWN = 32 /* FIXME: Exe is restarted if it dies */
      };
    typedef enum _Ecore_Exe_Flags Ecore_Exe_Flags;
    
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ecore/src/lib/ecore/ecore_private.h,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -3 -r1.32 -r1.33
--- ecore_private.h     10 Jan 2006 07:36:51 -0000      1.32
+++ ecore_private.h     10 Jan 2006 11:15:38 -0000      1.33
@@ -153,8 +153,10 @@
 {
    ECORE_EXE_PIPE_READ = 1,
    ECORE_EXE_PIPE_WRITE = 2,
-   ECORE_EXE_PIPE_READ_LINE_BUFFERED = 4,
-   ECORE_EXE_RESPAWN = 8
+   ECORE_EXE_PIPE_ERROR = 4,
+   ECORE_EXE_PIPE_READ_LINE_BUFFERED = 8,
+   ECORE_EXE_PIPE_ERROR_LINE_BUFFERED = 16,
+   ECORE_EXE_RESPAWN = 32
    /* FIXME: Getting respawn to work
     *
     * There is no way that we can do anything about the internal state info of
@@ -187,10 +189,12 @@
     *   pid               - it will be different
     *   child_fd_write    - it will be different
     *   child_fd_read     - it will be different
+    *   child_fd_error    - it will be different
     *   write_fd_handler  - we cannot change the fd used by a handler, this 
changes coz the fd changes.
     *   read_fd_handler   - we cannot change the fd used by a handler, this 
changes coz the fd changes.
+    *   error_fd_handler  - we cannot change the fd used by a handler, this 
changes coz the fd changes.
     *
-    * Hmm, the read and write buffers could be tricky.
+    * Hmm, the read, write, and error buffers could be tricky.
     * They are not atomic, and could be in a semi complete state.
     * They fall into the "state must be regenerated" mentioned above.
     * A respawn/add event should take care of it.
@@ -201,6 +205,8 @@
     *   write_data_offset - state that must be regenerated, zap it
     *   read_data_buf     - state that must be regenerated, zap it
     *   read_data_size    - state that must be regenerated, zap it
+    *   error_data_buf    - state that must be regenerated, zap it
+    *   error_data_size   - state that must be regenerated, zap it
     *   close_write       - state that must be regenerated, zap it
     *
     * There is the problem that an exe that fell over and needs respawning
@@ -239,6 +245,7 @@
    Ecore_Exe_Flags  flags;
    Ecore_Fd_Handler *write_fd_handler; /* the fd_handler to handle write to 
child - if this was used, or NULL if not */
    Ecore_Fd_Handler *read_fd_handler; /* the fd_handler to handle read from 
child - if this was used, or NULL if not */
+   Ecore_Fd_Handler *errro_fd_handler; /* the fd_handler to handle errors from 
child - if this was used, or NULL if not */
    void        *write_data_buf; /* a data buffer for data to write to the 
child - 
                                  * realloced as needed for more data and 
flushed when the fd handler says writes are possible 
                                 */
@@ -246,8 +253,11 @@
    int          write_data_offset; /* the offset in bytes in the data buffer */
    void        *read_data_buf; /* data read from the child awating delivery to 
an event */
    int          read_data_size; /* data read from child in bytes */
+   void        *error_data_buf; /* errors read from the child awating delivery 
to an event */
+   int          error_data_size; /* errors read from child in bytes */
    int          child_fd_write;        /* fd to write TO to send data to the 
child */
    int          child_fd_read; /* fd to read FROM when child has sent us (the 
parent) data */
+   int          child_fd_error;        /* fd to read FROM when child has sent 
us (the parent) errors */
    int          close_stdin;
 };
 #endif




-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to