X-Git-Url: https://git.xandkar.net/?p=khatus.git;a=blobdiff_plain;f=x5%2Fkhatus.c;fp=x5%2Fkhatus.c;h=5928dfb182e65ed8ce3c3c3eee7bb95c72958a39;hp=35509d47763c6db37736036e71d05eb9a4875be5;hb=c21cacfe19a8f0ec0676c21db23592e3b9ed5175;hpb=4e3d71e8aad165df793a94f58ffa3c969400c736 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: