1
Index: b/src/ck-sysdeps-unix.c
2
===================================================================
3
--- a/src/ck-sysdeps-unix.c
4
+++ b/src/ck-sysdeps-unix.c
10
#include <sys/types.h>
12
#include <sys/socket.h>
18
fd = open (fnam, O_RDONLY | O_NOCTTY);
19
if (fd < 0 && errno == EACCES)
20
fd = open (fnam, O_WRONLY | O_NOCTTY);
22
+ if (fd < 0 && errno == EIO) {
23
+ /* Linux can return EIO if the tty is currently closing,
24
+ * which can happen if multiple processes are opening and
25
+ * closing the console in parallel. Unfortunately it can
26
+ * also return EIO in more serious situations too (see
27
+ * https://bugs.launchpad.net/bugs/554172), but there isn't
28
+ * much we can do about that since we really need a console
31
+ struct timespec ts = { 0, 100000000 }; /* 0.1 seconds */
32
+ nanosleep (&ts, NULL);