]> sourceware.org Git - newlib-cygwin.git/commitdiff
include/
authorVladimir Prus <vladimir@codesourcery.com>
Wed, 31 Jan 2007 18:49:40 +0000 (18:49 +0000)
committerVladimir Prus <vladimir@codesourcery.com>
Wed, 31 Jan 2007 18:49:40 +0000 (18:49 +0000)
        * libiberty.h (PEX_STDERR_TO_PIPE): New define.
        (PEX_BINARY_ERROR): New define.
        (pex_read_err): New function.

        libiberty/
        * pex-common.h (struct pex_obj): New fields
        stderr_pipe and read_err.
        * pex-common.c (pex_init_common): Initialize
        stderr_pipe.
        (pex_run_in_environment): Add error checking
        for PEX_STDERR_TO_PIPE.  Create a pipe
        for stderr if necessary.
        (pex_read_err): New.
        (pex_free): Close read_err.
        * pexecute.txh: Document changes.
        * functions.texi: Regenerated.

include/ChangeLog
include/libiberty.h

index ee71d3e432195c8b7b631fd281c6b613f1e161cc..6e67822f186b835523cbbecef190078eef3edac5 100644 (file)
@@ -1,3 +1,9 @@
+2007-01-31  Vladimir Prus  <vladimir@codesourcery.com>
+       
+       * libiberty.h (PEX_STDERR_TO_PIPE): New define.
+       (PEX_BINARY_ERROR): New define.
+       (pex_read_err): New function.
+
 2007-01-29  Simon Baldwin <simonb@google.com>
 
        * demangle.h: New cplus_demangle_print_callback,
index 27291c988681629ac25aeeff0199af1ecc25166f..cc6cce3d22028ec75b4eebf8686ae8a0492e61f6 100644 (file)
@@ -400,6 +400,19 @@ extern struct pex_obj *pex_init (int flags, const char *pname,
    PEX_BINARY_INPUT.  */
 #define PEX_BINARY_OUTPUT      0x20
 
+/* Capture stderr to a pipe.  The output can be read by
+   calling pex_read_err and reading from the returned
+   FILE object.  This flag may be specified only for
+   the last program in a pipeline.  
+
+   This flag is supported only on Unix and Windows.  */
+#define PEX_STDERR_TO_PIPE     0x40
+
+/* Capture stderr in binary mode.  This flag is ignored
+   on Unix.  */
+#define PEX_BINARY_ERROR       0x80
+
+
 /* Execute one program.  Returns NULL on success.  On error returns an
    error string (typically just the name of a system call); the error
    string is statically allocated.
@@ -521,6 +534,14 @@ extern FILE *pex_input_pipe (struct pex_obj *obj, int binary);
 
 extern FILE *pex_read_output (struct pex_obj *, int binary);
 
+/* Read the standard error of the last program to be executed.
+   pex_run can not be called after this.  BINARY should be non-zero if
+   the file should be opened in binary mode; this is ignored on Unix.
+   Returns NULL on error.  Don't call fclose on the returned FILE; it
+   will be closed by pex_free.  */
+
+extern FILE *pex_read_err (struct pex_obj *, int binary);
+
 /* Return exit status of all programs in VECTOR.  COUNT indicates the
    size of VECTOR.  The status codes in the vector are in the order of
    the calls to pex_run.  Returns 0 on error, 1 on success.  */
This page took 0.033375 seconds and 5 git commands to generate.