In qtbase/src/3rdparty/forkfd/forkfd.c a signal handler is registered for SIGCHLD. In a comment in the signal handler function there's a link to a web page (http://pubs.opengroup.org/onlinepubs/9699919799/functions/V2_chap02.html#tag_15_04_03) giving some guidance on what can be done in signal handlers.
The page gives this advise:
"Operations which obtain the value of errno and operations which assign a value to errno shall be async-signal-safe, provided that the signal-catching function saves the value of errno upon entry and restores it before it returns."
sigchld_handler() in forkfd.c doesn't follow this. For example it calls waitid(), but doesn't save or restore errno in any way.