aboutsummaryrefslogtreecommitdiff
path: root/libcrystfel/src
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2012-12-03 15:07:56 +0100
committerThomas White <taw@physics.org>2012-12-03 17:12:32 +0100
commit603e2058985c3547b22a6e0eed4a098355441efd (patch)
tree80c5e024af13034258fc5f53e74af809b930a716 /libcrystfel/src
parentb5cffa9536b8927bf4482a50e190fdcb525d0e8d (diff)
Use a less scary message for EINTR
This is almost completely benign, and happens when profiling.
Diffstat (limited to 'libcrystfel/src')
-rw-r--r--libcrystfel/src/dirax.c18
-rw-r--r--libcrystfel/src/mosflm.c20
2 files changed, 31 insertions, 7 deletions
diff --git a/libcrystfel/src/dirax.c b/libcrystfel/src/dirax.c
index b3a8f15d..160df719 100644
--- a/libcrystfel/src/dirax.c
+++ b/libcrystfel/src/dirax.c
@@ -521,9 +521,21 @@ void run_dirax(struct image *image)
sval = select(dirax->pty+1, &fds, NULL, NULL, &tv);
if ( sval == -1 ) {
- int err = errno;
- ERROR("select() failed: %s\n", strerror(err));
- rval = 1;
+
+ const int err = errno;
+
+ switch ( err ) {
+
+ case EINTR:
+ STATUS("Restarting select()\n");
+ break;
+
+ default:
+ ERROR("select() failed: %s\n", strerror(err));
+ rval = 1;
+
+ }
+
} else if ( sval != 0 ) {
rval = dirax_readable(image, dirax);
} else {
diff --git a/libcrystfel/src/mosflm.c b/libcrystfel/src/mosflm.c
index e9a1b675..2d70f83f 100644
--- a/libcrystfel/src/mosflm.c
+++ b/libcrystfel/src/mosflm.c
@@ -599,10 +599,22 @@ void run_mosflm(struct image *image, UnitCell *cell)
sval = select(mosflm->pty+1, &fds, NULL, NULL, &tv);
- if ( sval == -1 ) {
- int err = errno;
- ERROR("select() failed: %s\n", strerror(err));
- rval = 1;
+ if ( sval == -1 ) {
+
+ const int err = errno;
+
+ switch ( err ) {
+
+ case EINTR:
+ STATUS("Restarting select()\n");
+ break;
+
+ default:
+ ERROR("select() failed: %s\n", strerror(err));
+ rval = 1;
+
+ }
+
} else if ( sval != 0 ) {
rval = mosflm_readable(image, mosflm);
} else {