Skip to content
Commit 1aa6738d authored by Florian Weimer's avatar Florian Weimer Committed by Mike Frysinger
Browse files

tst-mallocfork2: Fix race condition, use fewer resources

The first SIGUSR1 signal could arrive when sigusr1_sender_pid
was still 0.  As a result, kill would send SIGSTOP to the
entire process group.  This would cause the test to hang before
printing any output.

This commit also adds a sched_yield to the signal source, so that
it does not flood the parent process with signals it has never a
chance to handle.

Even with these changes, tst-mallocfork2 still fails reliably
after the fix in commit commit 56290d6e
(Increase fork signal safety for single-threaded processes) is
backed out.

(cherry picked from commit e2cd73a2)

The backport increases the timeout to 20 seconds, in line with
the default on master.  (The branch default of 2 seconds is too
tight.)

(cherry picked from commit 25a34b0a)
parent d9bd52a8
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment