aboutsummaryrefslogtreecommitdiff
path: root/libiberty/pex-common.h
diff options
context:
space:
mode:
authorDJ Delorie <dj@redhat.com>2006-08-28 00:56:25 +0000
committerDJ Delorie <dj@redhat.com>2006-08-28 00:56:25 +0000
commitcb6c09ace53de4a2952de95ff0f1f91e4809fbaa (patch)
treef1bcc51e7ead9bc22f4332bf59ddac7302656d6b /libiberty/pex-common.h
parent289397ccec5e89b311f173c9ea5df19cfb323587 (diff)
downloadgdb-cb6c09ace53de4a2952de95ff0f1f91e4809fbaa.zip
gdb-cb6c09ace53de4a2952de95ff0f1f91e4809fbaa.tar.gz
gdb-cb6c09ace53de4a2952de95ff0f1f91e4809fbaa.tar.bz2
merge from gcc
Diffstat (limited to 'libiberty/pex-common.h')
-rw-r--r--libiberty/pex-common.h13
1 files changed, 8 insertions, 5 deletions
diff --git a/libiberty/pex-common.h b/libiberty/pex-common.h
index 520f26a..0e88c35 100644
--- a/libiberty/pex-common.h
+++ b/libiberty/pex-common.h
@@ -96,17 +96,20 @@ struct pex_funcs
int (*open_write) (struct pex_obj *, const char */* name */,
int /* binary */);
/* Execute a child process. FLAGS, EXECUTABLE, ARGV, ERR are from
- pex_run. IN, OUT, ERRDES are each a descriptor, from open_read,
- open_write, or pipe, or they are one of STDIN_FILE_NO,
- STDOUT_FILE_NO or STDERR_FILE_NO; if not STD*_FILE_NO, they
- should be closed. The function should handle the
+ pex_run. IN, OUT, ERRDES, TOCLOSE are all descriptors, from
+ open_read, open_write, or pipe, or they are one of STDIN_FILE_NO,
+ STDOUT_FILE_NO or STDERR_FILE_NO; if IN, OUT, and ERRDES are not
+ STD*_FILE_NO, they should be closed. If the descriptor TOCLOSE
+ is not -1, and the system supports pipes, TOCLOSE should be
+ closed in the child process. The function should handle the
PEX_STDERR_TO_STDOUT flag. Return >= 0 on success, or -1 on
error and set *ERRMSG and *ERR. */
long (*exec_child) (struct pex_obj *, int /* flags */,
const char */* executable */, char * const * /* argv */,
char * const * /* env */,
int /* in */, int /* out */, int /* errdes */,
- const char **/* errmsg */, int */* err */);
+ int /* toclose */, const char **/* errmsg */,
+ int */* err */);
/* Close a descriptor. Return 0 on success, -1 on error. */
int (*close) (struct pex_obj *, int);
/* Wait for a child to complete, returning exit status in *STATUS