Commit d4a0078b by Eric Botcazou Committed by Eric Botcazou

re PR ada/66526 (apparent use of uninitialized variables in g-expect.adb)

	PR ada/66526
	* g-expect.adb (Set_Up_Child_Communications): Add matching condition
	for uses of Input, Ouput and Error variables after the Execvp call.

From-SVN: r231450
parent 76680678
2015-12-09 Eric Botcazou <ebotcazou@adacore.com>
PR ada/66526
* g-expect.adb (Set_Up_Child_Communications): Add matching condition
for uses of Input, Ouput and Error variables after the Execvp call.
2015-12-08 Jakub Jelinek <jakub@redhat.com> 2015-12-08 Jakub Jelinek <jakub@redhat.com>
PR c/48088 PR c/48088
......
...@@ -1348,17 +1348,22 @@ package body GNAT.Expect is ...@@ -1348,17 +1348,22 @@ package body GNAT.Expect is
Portable_Execvp (Pid.Pid'Access, Cmd & ASCII.NUL, Args); Portable_Execvp (Pid.Pid'Access, Cmd & ASCII.NUL, Args);
-- The following commands are not executed on Unix systems, and are only -- The following lines are only required for Windows systems and will
-- required for Windows systems. We are now in the parent process. -- not be executed on Unix systems, but we use the same condition as
-- above to avoid warnings on uninitialized variables on Unix systems.
-- We are now in the parent process.
-- Restore the old descriptors if No_Fork_On_Target then
-- Restore the old descriptors
Dup2 (Input, GNAT.OS_Lib.Standin); Dup2 (Input, GNAT.OS_Lib.Standin);
Dup2 (Output, GNAT.OS_Lib.Standout); Dup2 (Output, GNAT.OS_Lib.Standout);
Dup2 (Error, GNAT.OS_Lib.Standerr); Dup2 (Error, GNAT.OS_Lib.Standerr);
Close (Input); Close (Input);
Close (Output); Close (Output);
Close (Error); Close (Error);
end if;
end Set_Up_Child_Communications; end Set_Up_Child_Communications;
--------------------------- ---------------------------
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment