From f4a2eb7807850df8381b0a4960b5a995e182bb4f Mon Sep 17 00:00:00 2001 From: John Denker Date: Fri, 23 Nov 2012 10:50:53 -0800 Subject: comments: plans and questions --- tools/hi-q.c | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) (limited to 'tools') diff --git a/tools/hi-q.c b/tools/hi-q.c index 59cad5d..769433a 100644 --- a/tools/hi-q.c +++ b/tools/hi-q.c @@ -88,6 +88,43 @@ typedef enum {MSG, ENV} channeler; // // Note that series and stub use the same exit codes as qq. // + +/* +Notation for future use: + 0< &kb 1> &scr 2> &scr prog1 # stand-alone + 0< &kb 1> &redpipe 2> &scr prog2 # upstream end of pipe + 0< &redpipe 1> &scr 2> &scr prog3 # downstream end of pipe + + 0< &msg 1< &envelope 2> &log qmail-queue + + 0< &kb 1> &scr 2> &scr 7> &up 8< &down parent + 0< &up 1> &down 2> &scr childprocess + +Simple case: + 0< &msg 1> &msg2 2> &log skrewt + 0< &msg2 1> &msg3 2> &log spamc + 0< &msg3 1< &envelope 2> &log qmail-queue + +Fancier "triangular piping" case: + 0< &msg 1< &env 2> &log 7> &msg2 8> &env2 skrewt + 0< &msg2 1> &msg3 2> &log spamc + 0< &msg3 1< &env2 2> &log qmail-queue + +Note that units 7 and 8 are arbitrary and could be renumbered. In +contrast, many of the other are fixed by standards and/or traditions. + +Some questions: + +How hard is it to detect a /dry/ pipe segment, i.e. one where all the +writing-ends have been closed, and all the bytes have been read? This +means the reading ends can be closed, freeing up FD units. + +Similarly, now hard is it to detect a /broken/ pipe segment, i.e. one +where all the reading ends have been closed? This means the writing +ends can be closed, freeing up FD units. + +*/ + typedef enum {series, stub, sa, qq, postspam, fail} moder; class jobber{ -- cgit v1.2.3