Fix a crash in QProcess signal handling on Mac.
On Mac, SA_SIGINFO can be set while the handler is SIG_DFL. Change-Id: Ibaeaa1612e27217826841d7400309c45b5a101ea Initial-patch-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
parent
445efa40a2
commit
f83fa3c95e
@ -141,7 +141,8 @@ static void qt_sa_sigchld_sigaction(int signum, siginfo_t *info, void *context)
|
|||||||
if (qt_sa_old_sigchld_handler.sa_flags & SA_SIGINFO) {
|
if (qt_sa_old_sigchld_handler.sa_flags & SA_SIGINFO) {
|
||||||
void (*oldAction)(int, siginfo_t *, void *) = vsa->sa_sigaction;
|
void (*oldAction)(int, siginfo_t *, void *) = vsa->sa_sigaction;
|
||||||
|
|
||||||
oldAction(signum, info, context);
|
if (oldAction)
|
||||||
|
oldAction(signum, info, context);
|
||||||
} else {
|
} else {
|
||||||
void (*oldAction)(int) = vsa->sa_handler;
|
void (*oldAction)(int) = vsa->sa_handler;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user