diff options
author | 2019-05-26 15:58:13 +0300 | |
---|---|---|
committer | 2019-05-26 15:58:13 +0300 | |
commit | 81602e816f9d1e9ae0fa06482037e79bb8750806 (patch) | |
tree | 5cb4bb90fa9f6e1042077c2171b34eb07d7db436 /src/daemon/proto_stdio_private.h | |
parent | 9e3e2a9d886f8191bccc69ccc356f683e4a0c561 (diff) | |
download | usurpation-81602e816f9d1e9ae0fa06482037e79bb8750806.tar.gz usurpation-81602e816f9d1e9ae0fa06482037e79bb8750806.tar.bz2 usurpation-81602e816f9d1e9ae0fa06482037e79bb8750806.zip |
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 <gediminas@varciai.lt>
Diffstat (limited to 'src/daemon/proto_stdio_private.h')
-rw-r--r-- | src/daemon/proto_stdio_private.h | 2 |
1 files changed, 2 insertions, 0 deletions
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 */ |