RFR: 8290059: Do not use std::thread in panama tests [v2]

Jorn Vernee jvernee at openjdk.org
Tue Jul 26 13:47:03 UTC 2022


On Tue, 26 Jul 2022 13:39:50 GMT, Jorn Vernee <jvernee at openjdk.org> wrote:

>> The intent was to exit the test with a non-zero exit code, in order to avoid any accidental false positives.
>> 
>> I could return the error code from `GetLastError` and from the respective pthread apis as an exit code instead. Is that what you mean?
>
> FWIW, `perror` just prints to `stderr`: https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/perror-wperror?view=msvc-170

Ah, I see what you mean now. The C standard library function `perror` defines this to also print a textual description of `errno`. https://en.cppreference.com/w/c/io/perror so that won't work for the Windows APIs.

I think the alternative would be to use `FormatMessage` on Windows. I didn't really think that much into this.

Maybe it's clearer to use `fputs` with `stderr` here.

-------------

PR: https://git.openjdk.org/jdk/pull/9599



More information about the build-dev mailing list