* David Matthews:
The difficulty with getting errno in this way is that by the time you get it it may have changed from the value it had. Any calls to the run-time system may involve a system call that could affect it.
Would it make sense to use a special return type which instructs PolyML to obtain the errno value at the time of return? This would address the synchronization issue.