[Ada] Raise exception on call to Expect for a dead process

Pierre-Marie de Rodat derodat@adacore.com
Wed Sep 18 08:41:00 GMT 2019


Call to Expect for a dead process results in SIGBUS signal on Linux
systems. Process_Died exception is raised in this case now.

Tested on x86_64-pc-linux-gnu, committed on trunk

2019-09-18  Vadim Godunko  <godunko@adacore.com>

gcc/ada/

	* libgnat/g-expect.adb (Expect_Internal): Don't include invalid
	file descriptors into the set of file descriptors for Poll.
	Raise Process_Died exception when computed set of file
	descriptors to monitor is empty.

gcc/testsuite/

	* gnat.dg/expect4.adb: New testcase.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch.diff
Type: text/x-diff
Size: 1655 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20190918/7e2a38fc/attachment.bin>


More information about the Gcc-patches mailing list