From 81602e816f9d1e9ae0fa06482037e79bb8750806 Mon Sep 17 00:00:00 2001 From: Gediminas Jakutis Date: Sun, 26 May 2019 15:58:13 +0300 Subject: daemon: improve threading logic on null proto. Functions now prevent interruptions that can produce an inconsistent state in the program. Also, cosmetic changes. Signed-off-by: Gediminas Jakutis --- src/daemon/proto_stdio_private.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/daemon/proto_stdio_private.h') diff --git a/src/daemon/proto_stdio_private.h b/src/daemon/proto_stdio_private.h index 4b0ab6f..209d191 100644 --- a/src/daemon/proto_stdio_private.h +++ b/src/daemon/proto_stdio_private.h @@ -42,4 +42,6 @@ static struct state { static void *read_stdin(void *arg); static void *write_stdout(void *arg); +static const struct timespec respite = {0, 10 * 1000 * 1000}; /* 10ms */ + #endif /* USURPATION_PROTO_STDIO_PRIVATE_H */ -- cgit v1.2.3