summaryrefslogtreecommitdiff
path: root/gcc/ada/g-expect.adb
diff options
context:
space:
mode:
authorbstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4>2009-07-22 17:58:10 +0000
committerbstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4>2009-07-22 17:58:10 +0000
commitedbab208cf506c660d37346f43c5a2efa8528066 (patch)
treed003b4617eeb2ffd00a15cd15a40470fa4dee5a9 /gcc/ada/g-expect.adb
parent581b7a3847963e186af616e9b6a7390d120881d3 (diff)
downloadgcc-edbab208cf506c660d37346f43c5a2efa8528066.tar.gz
2009-07-22 Basile Starynkevitch <basile@starynkevitch.net>
MELT branch merged with trunk rev 149945 git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/melt-branch@149950 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/g-expect.adb')
-rw-r--r--gcc/ada/g-expect.adb9
1 files changed, 7 insertions, 2 deletions
diff --git a/gcc/ada/g-expect.adb b/gcc/ada/g-expect.adb
index 7ce2c89d771..405b0331275 100644
--- a/gcc/ada/g-expect.adb
+++ b/gcc/ada/g-expect.adb
@@ -814,7 +814,8 @@ package body GNAT.Expect is
Send (Process, Input);
end if;
- GNAT.OS_Lib.Close (Get_Input_Fd (Process));
+ Close (Process.Input_Fd);
+ Process.Input_Fd := Invalid_FD;
declare
Result : Expect_Match;
@@ -1305,10 +1306,14 @@ package body GNAT.Expect is
pragma Warnings (Off, Pipe1);
pragma Warnings (Off, Pipe2);
pragma Warnings (Off, Pipe3);
+
begin
Close (Pipe1.Input);
Close (Pipe2.Output);
- Close (Pipe3.Output);
+
+ if Pipe3.Output /= Pipe2.Output then
+ Close (Pipe3.Output);
+ end if;
end Set_Up_Parent_Communications;
------------------