git://git.jankratochvil.net
/
nethome.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix GCC -static-libstdc++.
[nethome.git]
/
src
/
orphanripper.c
diff --git
a/src/orphanripper.c
b/src/orphanripper.c
index
4893e8f
..
b289477
100644
(file)
--- a/
src/orphanripper.c
+++ b/
src/orphanripper.c
@@
-41,6
+41,7
@@
#include <assert.h>
#include <pty.h>
#include <poll.h>
#include <assert.h>
#include <pty.h>
#include <poll.h>
+#include <sys/stat.h>
#define LENGTH(x) (sizeof (x) / sizeof (*(x)))
#define LENGTH(x) (sizeof (x) / sizeof (*(x)))
@@
-87,6
+88,8
@@
static int read_out (int amaster)
/* Weird but at least after POLLHUP we get EIO instead of just EOF. */
if (buf_got == -1 && errno == EIO)
return 0;
/* Weird but at least after POLLHUP we get EIO instead of just EOF. */
if (buf_got == -1 && errno == EIO)
return 0;
+ if (buf_got == -1 && errno == EAGAIN)
+ return 0;
if (buf_got < 0)
{
perror ("read (amaster)");
if (buf_got < 0)
{
perror ("read (amaster)");