diff options
-rw-r--r-- | libcrystfel/src/dirax.c | 18 | ||||
-rw-r--r-- | libcrystfel/src/mosflm.c | 20 |
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 { |