Don Breazeal
7868401b7b
PR remote/19496, interrupted syscall in forking-threads-plus-bkpt
...
This patch addresses "fork:Interrupted system call" (or wait:) failures
in gdb.threads/forking-threads-plus-breakpoint.exp.
The test program spawns ten threads, each of which do ten fork/waitpid
sequences. The cause of the problem was that when one of the fork
children exited before the corresponding fork parent could initiate its
waitpid for that child, a SIGCHLD and/or SIGSTOP was delivered and
interrupted a fork or waitpid in another thread.
The fix was to wrap the system calls in a loop to retry the call if
it was interrupted, like:
do
{
pid = fork ();
}
while (pid == -1 && errno == EINTR);
Since this is a Linux-only test I figure it is OK to use errno and EINTR.
I tried a number of alternative fixes using SIG_IGN, SA_RESTART,
pthread_sigblock, and bsd_signal, but none of these worked as well.
Tested on Nios II Linux target with x86 Linux host.
gdb/testsuite/ChangeLog:
2016-03-16 Don Breazeal <donb@codesourcery.com >
* gdb.threads/forking-threads-plus-breakpoint.c (thread_forks):
Retry fork and waitpid on interrupted system call errors.
* gdb.threads/forking-threads-plus-breakpoint.exp: (do_test):
Use with_timeout_factor to increase timeout to 90.
2016-03-16 15:13:44 -07:00
..
2016-01-01 08:43:22 +04:00
2016-03-09 20:24:14 +00:00
2016-01-01 08:43:22 +04:00
2016-01-01 08:43:22 +04:00
2016-01-01 08:43:22 +04:00
2016-01-01 08:43:22 +04:00
2016-01-01 08:43:22 +04:00
2016-01-01 08:43:22 +04:00
2016-01-01 08:43:22 +04:00
2016-01-12 01:12:38 +00:00
2016-01-01 08:43:22 +04:00
2016-01-18 15:15:18 +00:00
2016-01-01 08:43:22 +04:00
2016-01-01 08:43:22 +04:00
2016-01-01 08:43:22 +04:00
2016-01-01 08:43:22 +04:00
2016-01-01 08:43:22 +04:00
2016-01-18 15:15:18 +00:00
2016-01-01 08:43:22 +04:00
2016-01-01 08:43:22 +04:00
2016-01-01 08:43:22 +04:00
2016-01-01 08:43:22 +04:00
2016-01-01 08:43:22 +04:00
2016-01-01 08:43:22 +04:00
2016-01-01 08:43:22 +04:00
2016-01-01 08:43:22 +04:00
2016-01-01 08:43:22 +04:00
2016-01-01 08:43:22 +04:00
2016-01-01 08:43:22 +04:00
2016-01-12 01:12:38 +00:00
2016-01-01 08:43:22 +04:00
2016-01-01 08:43:22 +04:00
2016-01-01 08:43:22 +04:00
2016-01-01 08:43:22 +04:00
2016-01-01 08:43:22 +04:00
2016-01-01 08:43:22 +04:00
2016-03-16 15:13:44 -07:00
2016-03-16 15:13:44 -07:00
2016-01-01 08:43:22 +04:00
2016-01-01 08:43:22 +04:00
2016-01-12 01:12:38 +00:00
2016-01-01 08:43:22 +04:00
2016-01-01 08:43:22 +04:00
2016-01-01 08:43:22 +04:00
2016-01-01 08:43:22 +04:00
2016-01-01 08:43:22 +04:00
2016-03-09 20:24:14 +00:00
2016-01-01 08:43:22 +04:00
2016-01-01 08:43:22 +04:00
2016-01-12 01:12:38 +00:00
2016-01-01 08:43:22 +04:00
2016-01-01 08:43:22 +04:00
2016-01-01 08:43:22 +04:00
2016-01-12 01:12:38 +00:00
2016-01-01 08:43:22 +04:00
2016-01-01 08:43:22 +04:00
2016-01-01 08:43:22 +04:00
2016-01-18 15:15:18 +00:00
2016-03-09 20:24:14 +00:00
2016-01-01 08:43:22 +04:00
2016-01-01 08:43:22 +04:00
2016-01-01 08:43:22 +04:00
2016-03-09 20:24:14 +00:00
2016-01-01 08:43:22 +04:00
2016-01-01 08:43:22 +04:00
2016-01-01 08:43:22 +04:00
2016-01-01 08:43:22 +04:00
2016-01-12 01:12:38 +00:00
2016-01-01 08:43:22 +04:00
2016-01-01 08:43:22 +04:00
2016-01-01 08:43:22 +04:00
2016-01-12 01:12:38 +00:00
2016-01-01 08:43:22 +04:00
2016-01-01 08:43:22 +04:00
2016-01-01 08:43:22 +04:00
2016-01-01 08:43:22 +04:00
2016-01-01 08:43:22 +04:00
2016-01-01 08:43:22 +04:00
2016-01-01 08:43:22 +04:00
2016-01-01 08:43:22 +04:00
2016-01-01 08:43:22 +04:00
2016-01-01 08:43:22 +04:00
2016-01-01 08:43:22 +04:00
2016-01-01 08:43:22 +04:00
2016-01-01 08:43:22 +04:00
2016-01-01 08:43:22 +04:00
2016-01-01 08:43:22 +04:00
2016-01-01 08:43:22 +04:00
2016-01-01 08:43:22 +04:00
2016-03-09 20:24:14 +00:00
2016-03-09 20:24:14 +00:00
2016-01-01 08:43:22 +04:00
2016-01-25 13:15:11 +00:00
2016-01-01 08:43:22 +04:00
2016-01-01 08:43:22 +04:00
2016-01-01 08:43:22 +04:00
2016-01-18 15:15:18 +00:00
2016-01-01 08:43:22 +04:00
2016-01-01 08:43:22 +04:00
2016-01-01 08:43:22 +04:00
2016-01-01 08:43:22 +04:00
2016-01-01 08:43:22 +04:00
2016-01-18 15:15:18 +00:00
2016-01-01 08:43:22 +04:00
2016-01-18 15:15:18 +00:00
2016-01-01 08:43:22 +04:00
2016-01-01 08:43:22 +04:00
2016-01-01 08:43:22 +04:00
2016-01-18 15:15:18 +00:00
2016-01-01 08:43:22 +04:00
2016-01-18 15:15:18 +00:00
2016-01-01 08:43:22 +04:00
2016-01-01 08:43:22 +04:00
2016-01-01 08:43:22 +04:00
2016-01-01 08:43:22 +04:00
2016-01-01 08:43:22 +04:00
2016-03-09 20:24:14 +00:00
2016-01-18 15:15:18 +00:00
2016-01-01 08:43:22 +04:00
2016-03-09 20:24:14 +00:00
2016-01-01 08:43:22 +04:00
2016-01-12 01:12:38 +00:00
2016-01-01 08:43:22 +04:00
2016-01-12 01:12:38 +00:00
2016-01-01 08:43:22 +04:00
2016-01-12 01:12:38 +00:00
2016-01-01 08:43:22 +04:00
2016-01-01 08:43:22 +04:00
2016-01-01 08:43:22 +04:00
2016-01-01 08:43:22 +04:00
2016-01-01 08:43:22 +04:00
2016-01-01 08:43:22 +04:00
2016-01-01 08:43:22 +04:00
2016-01-01 08:43:22 +04:00
2016-01-01 08:43:22 +04:00
2016-01-01 08:43:22 +04:00
2016-01-13 10:59:43 +00:00
2016-01-01 08:43:22 +04:00
2016-01-01 08:43:22 +04:00
2016-01-01 08:43:22 +04:00
2016-01-13 11:03:19 +00:00
2016-01-01 08:43:22 +04:00
2016-01-01 08:43:22 +04:00
2016-01-01 08:43:22 +04:00
2016-01-01 08:43:22 +04:00
2016-01-01 08:43:22 +04:00
2016-01-01 08:43:22 +04:00
2016-01-01 08:43:22 +04:00
2016-01-01 08:43:22 +04:00
2016-01-01 08:43:22 +04:00
2016-01-01 08:43:22 +04:00
2016-01-01 08:43:22 +04:00
2016-01-01 08:43:22 +04:00
2016-01-01 08:43:22 +04:00
2016-01-01 08:43:22 +04:00
2016-01-01 08:43:22 +04:00
2016-01-01 08:43:22 +04:00
2016-03-09 20:24:14 +00:00
2016-03-01 17:25:56 +00:00
2016-03-01 17:25:56 +00:00
2016-01-01 08:43:22 +04:00
2016-03-01 17:25:56 +00:00
2016-01-18 15:15:18 +00:00
2016-03-01 17:25:56 +00:00
2016-01-01 08:43:22 +04:00
2016-01-01 08:43:22 +04:00
2016-01-01 08:43:22 +04:00
2016-01-01 08:43:22 +04:00
2016-01-01 08:43:22 +04:00
2016-01-01 08:43:22 +04:00
2016-01-01 08:43:22 +04:00
2016-01-01 08:43:22 +04:00