[io-layer] Fix process_wait return value for current process
commit98f96e9559786c325a1f4edf7f4097b0b43ca130
authorLudovic Henry <ludovic@xamarin.com>
Mon, 22 Feb 2016 11:15:11 +0000 (22 11:15 +0000)
committerLudovic Henry <ludovic@xamarin.com>
Mon, 22 Feb 2016 11:22:46 +0000 (22 11:22 +0000)
treeb6f3ff6954092000e62179c8e5ae35117b2d887a
parent28b7a83ff63f6e40dfdbd8b222655e0f1b5d3058
[io-layer] Fix process_wait return value for current process

When waiting on the current process, we would return WAIT_FAILED, as waitpid would return -1, with errno set to ECHILD.
But the semantic of WaitForSingleObjectEx and WaitForMultipleObjectsEx when waiting on current process is to return WAIT_TIMEOUT. This is then a special case that we need to add to this code.
mono/io-layer/processes.c