summaryrefslogtreecommitdiffstats
path: root/src/opengl/qopenglversionfunctions.cpp
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2023-06-02 23:07:59 -0700
committerThiago Macieira <thiago.macieira@intel.com>2023-06-09 17:27:47 -0700
commite71c226d6f188abd811b28d3cb7529343f52d61f (patch)
tree58dd4892d4600b226152f078d91bdda92ac865c0 /src/opengl/qopenglversionfunctions.cpp
parent062b2ac71bac1e0449eff7f8f02cb0020ad39991 (diff)
QProcess/Unix: call the internal version of sigaction()
I've investigated the functions we call in the child side of a vfork() for implementations that do more than simply place the system call. Where wrappers exist, they are usually related to handling of Unix signals or PThread cancellation. The implementations investigated are: - Bionic (Android) - FreeBSD - glibc (Linux) - MUSL (Linux) - NetBSD - OpenBSD Relating to thread cancellation, NetBSD implements it with an internal API that does not include Unix signals and Bionic doesn't implement thread cancellation at all. Their wrapper functions are harmless. The rest do use Unix signals to implement thread cancellations (called SIGCANCEL everywhere except OpenBSD, where it's SIGTHR). Therefore, they all block the application attempts to mask this signal or change its handler (if they're not buggy). FreeBSD's and MUSL's do some locking in their implementations[1][2] we really want to bypass, therefore we must bypass their sigaction() wrappers. The investigation also showed that the glibc[3] and NetBSD[4] abort() implementations to be slightly unsafe, but we don't use them ourselves. We're also adding QProcess::failChildProcessModifier() so users won't have to resort to abort(). [1] https://github.com/bminor/musl/blob/master/src/signal/sigaction.c [2] https://github.com/freebsd/freebsd-src/blob/main/lib/libthr/thread/thr_sig.c [3] https://codebrowser.dev/glibc/glibc/stdlib/abort.c.html [4] https://github.com/NetBSD/src/blob/trunk/lib/libc/stdlib/abort.c Task-number: QTBUG-113822 Pick-to: 6.6 Change-Id: I9201d9ecf52f4146bb04fffd17651123800e15a4 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Diffstat (limited to 'src/opengl/qopenglversionfunctions.cpp')
0 files changed, 0 insertions, 0 deletions