aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2011-01-14 17:36:16 +0100
committerThomas White <taw@physics.org>2012-02-22 15:27:11 +0100
commit71c58411d4e85d46c3033d9064750fe22d21a0a8 (patch)
tree0bc73de10787bbe4482213d53001a64d3159d503 /src
parent0ac37d58867aa23d3cab2aab1d45e4d2affd59d0 (diff)
Describe cause of select() failure
Diffstat (limited to 'src')
-rw-r--r--src/dirax.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/dirax.c b/src/dirax.c
index f811d394..aa748649 100644
--- a/src/dirax.c
+++ b/src/dirax.c
@@ -24,6 +24,7 @@
#include <fcntl.h>
#include <assert.h>
#include <sys/ioctl.h>
+#include <errno.h>
#if HAVE_FORKPTY_LINUX
#include <pty.h>
@@ -497,7 +498,8 @@ void run_dirax(struct image *image)
sval = select(dirax->pty+1, &fds, NULL, NULL, &tv);
if ( sval == -1 ) {
- ERROR("select() failed.\n");
+ int err = errno;
+ ERROR("select() failed: %s\n", strerror(err));
rval = 1;
} else if ( sval != 0 ) {
rval = dirax_readable(image, dirax);