From: Mark Mitchell Date: Tue, 21 Mar 2006 07:54:30 +0000 (+0000) Subject: * libiberty/pex-common.c (pex_run): Close the write end of the X-Git-Tag: gdb-csl-20060226-branch-merge-to-csl-local-1~15 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=9eaddd9b8be2666baa99965526d36e58e4ec9ef9;p=thirdparty%2Fbinutils-gdb.git * libiberty/pex-common.c (pex_run): Close the write end of the pipe after starting the child. --- diff --git a/ChangeLog.csl b/ChangeLog.csl index e55efd23453..95a2ea8a1ee 100644 --- a/ChangeLog.csl +++ b/ChangeLog.csl @@ -1,5 +1,8 @@ 2006-03-20 Mark Mitchell + * libiberty/pex-common.c (pex_run): Close the write end of the + pipe after starting the child. + * gdb/config/arm/armv7m.mt (TDEPFILES): Add prologue-value.o. 2006-03-21 Paul Brook diff --git a/libiberty/pex-common.c b/libiberty/pex-common.c index 38e3ac76956..fd0c6b22e9b 100644 --- a/libiberty/pex-common.c +++ b/libiberty/pex-common.c @@ -108,6 +108,8 @@ pex_run (struct pex_obj *obj, int flags, const char *executable, in = -1; out = -1; errdes = -1; + p[READ_PORT] = -1; + p[WRITE_PORT] = -1; outname = (char *) orig_outname; outname_allocated = 0; @@ -276,6 +278,8 @@ pex_run (struct pex_obj *obj, int flags, const char *executable, pid = obj->funcs->exec_child (obj, flags, executable, argv, in, out, errdes, &errmsg, err); + if (p[WRITE_PORT] != -1) + obj->funcs->close (obj, p[WRITE_PORT]); if (pid < 0) goto error_exit;