aboutsummaryrefslogtreecommitdiff
path: root/libcrystfel/src/mosflm.c
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2016-07-28 11:07:19 +0200
committerThomas White <taw@physics.org>2016-07-28 16:17:50 +0200
commit9f7a7fc4571b1b57eee243d26b8778ac9556ffaf (patch)
treeb499f87cfe070fb3c9e2bc7c25eb42726904d30b /libcrystfel/src/mosflm.c
parentbb89ebb6047ceb894188ff8a3a803210d4ee26c0 (diff)
Check return values when writing to Mosflm or DirAx
Diffstat (limited to 'libcrystfel/src/mosflm.c')
-rw-r--r--libcrystfel/src/mosflm.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libcrystfel/src/mosflm.c b/libcrystfel/src/mosflm.c
index f1a1e8ae..f0a269ed 100644
--- a/libcrystfel/src/mosflm.c
+++ b/libcrystfel/src/mosflm.c
@@ -446,7 +446,9 @@ static void mosflm_sendline(const char *line, struct mosflm_data *mosflm)
free(copy);
#endif
- write(mosflm->pty, line, strlen(line));
+ if ( write(mosflm->pty, line, strlen(line)) == -1 ) {
+ ERROR("write() to MOSFLM failed: %s\n", strerror(errno));
+ }
}