|
From: <sv...@va...> - 2014-08-28 20:19:48
|
Author: philippe
Date: Thu Aug 28 20:19:41 2014
New Revision: 14378
Log:
Check that vgdb ptrace actions do not cause a EINTR or whatever
to go out of the select syscall
Modified:
trunk/gdbserver_tests/sleepers.c
Modified: trunk/gdbserver_tests/sleepers.c
==============================================================================
--- trunk/gdbserver_tests/sleepers.c (original)
+++ trunk/gdbserver_tests/sleepers.c Thu Aug 28 20:19:41 2014
@@ -71,7 +71,7 @@
{
int i = 0;
struct spec* s = (struct spec*)v;
-
+ int ret;
fprintf(stderr, "%s ready to sleep and/or burn\n", s->name);
fflush (stderr);
signal_ready();
@@ -81,7 +81,10 @@
if (sleepms > 0 && s->sleep) {
t[s->t].tv_sec = sleepms / 1000;
t[s->t].tv_usec = (sleepms % 1000) * 1000;
- select (0, NULL, NULL, NULL, &t[s->t]);
+ ret = select (0, NULL, NULL, NULL, &t[s->t]);
+ /* We only expect a timeout result from the above. */
+ if (ret != 0)
+ perror("unexpected result from select");
}
if (burn > 0 && s->burn)
do_burn();
|