diff options
author | Laurent Bercot <ska-skaware@skarnet.org> | 2020-11-23 15:53:39 +0000 |
---|---|---|
committer | Laurent Bercot <ska-skaware@skarnet.org> | 2020-11-23 15:53:39 +0000 |
commit | eb37f0151f49d80117b0e215b1524e71e9c85dde (patch) | |
tree | 688cb90f2f8b3701634b5c968f6951a4a3a5a98a /src | |
parent | 030ba53485e9b8a2793e1f1c9c8f62f8b8987e95 (diff) | |
download | s6-networking-eb37f0151f49d80117b0e215b1524e71e9c85dde.tar.xz |
minidentd QoL fix
Diffstat (limited to 'src')
-rw-r--r-- | src/minidentd/minidentd.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/minidentd/minidentd.c b/src/minidentd/minidentd.c index 898de28..a5115b7 100644 --- a/src/minidentd/minidentd.c +++ b/src/minidentd/minidentd.c @@ -5,6 +5,7 @@ #include <unistd.h> #include <errno.h> #include <pwd.h> + #include <skalibs/types.h> #include <skalibs/allreadwrite.h> #include <skalibs/bytestr.h> @@ -18,6 +19,7 @@ #include <skalibs/tai.h> #include <skalibs/random.h> #include <skalibs/unix-timed.h> + #include "mgetuid.h" #define USAGE "minidentd [ -v ] [ -n | -i | -r ] [ -y file ] [ -t timeout ]" @@ -262,7 +264,7 @@ int main (int argc, char const *const *argv, char const *const *envp) r = timed_getln_g(buffer_0small, &line, '\n', &deadline) ; if (r == -1) { - if (errno == ETIMEDOUT) return 1 ; + if (errno == ETIMEDOUT || errno == ECONNRESET) return 1 ; else strerr_diefu1sys(111, "read from stdin") ; } if (!r) break ; |