From: Siraaj Khandkar Date: Thu, 26 Mar 2020 21:45:16 +0000 (-0400) Subject: Note problems with lossless msg-handling alternatives X-Git-Url: https://git.xandkar.net/?p=khatus.git;a=commitdiff_plain;h=c21cacfe19a8f0ec0676c21db23592e3b9ed5175 Note problems with lossless msg-handling alternatives --- diff --git a/x5/khatus.c b/x5/khatus.c index 35509d4..5928dfb 100644 --- a/x5/khatus.c +++ b/x5/khatus.c @@ -291,6 +291,19 @@ slots_read(Config *cfg, struct timespec *ti, char *buf) * This is an acceptable trade-off because we * are a stateless reporter of a _most-recent_ * status, not a stateful accumulator. + * + * ### LOSSLESS ALTERNATIVES ### + * - Read each pipe until EOF before reading + * another. + * PROBLEM: a fast writer can trap us in the + * read loop. + * + * - Read each pipe until EOM, but close only + * at EOF. + * PROBLEM: a fast writer can fill the pipe + * faster than we can read it and we end-up + * displaying stale data. + * */ case END_OF_MESSAGE: case END_OF_FILE: