aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2012-11-21 16:25:23 +0100
committerThomas White <taw@physics.org>2012-11-21 16:26:10 +0100
commit8c06fcfebab8bf67ee5674ced83942123964ff10 (patch)
treeaf6a7daaccfda5db0ea8f4726fbd9f4c399f99b9
parent92058254984777b4a7bec0142ad4dde7e86ccb44 (diff)
Show error information if forkpty() fails
-rw-r--r--libcrystfel/src/dirax.c2
-rw-r--r--libcrystfel/src/mosflm.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/libcrystfel/src/dirax.c b/libcrystfel/src/dirax.c
index 43de6c6e..b3a8f15d 100644
--- a/libcrystfel/src/dirax.c
+++ b/libcrystfel/src/dirax.c
@@ -473,7 +473,7 @@ void run_dirax(struct image *image)
dirax->pid = forkpty(&dirax->pty, NULL, NULL, NULL);
if ( dirax->pid == -1 ) {
- ERROR("Failed to fork for DirAx\n");
+ ERROR("Failed to fork for DirAx: %s\n", strerror(errno));
return;
}
if ( dirax->pid == 0 ) {
diff --git a/libcrystfel/src/mosflm.c b/libcrystfel/src/mosflm.c
index 38f8478b..e9a1b675 100644
--- a/libcrystfel/src/mosflm.c
+++ b/libcrystfel/src/mosflm.c
@@ -554,7 +554,7 @@ void run_mosflm(struct image *image, UnitCell *cell)
mosflm->pid = forkpty(&mosflm->pty, NULL, NULL, NULL);
if ( mosflm->pid == -1 ) {
- ERROR("Failed to fork for MOSFLM\n");
+ ERROR("Failed to fork for MOSFLM: %s\n", strerror(errno));
free(mosflm);
return;
}