[Ada] Stabilize exit code on close process
authorDmitriy Anisimkov <anisimko@adacore.com>
Tue, 21 Dec 2021 06:01:32 +0000 (12:01 +0600)
committerPierre-Marie de Rodat <derodat@adacore.com>
Mon, 9 May 2022 09:27:28 +0000 (09:27 +0000)
commit9a6f7575c153e7036152002bb7b58166762592f1
tree7797165452f29f0f3699b07c948a2dcff27a9367
parent1e2334302d6ad5dd8526c21b8062dc16a688f3e8
[Ada] Stabilize exit code on close process

Call Kill before close input handler in Close routine.  Otherwise close
input handler can terminate process before Kill and exit code became
unpredictable.

gcc/ada/

* libgnat/g-expect.adb (Close): Call Kill before Close_Input.
gcc/ada/libgnat/g-expect.adb