From f96288efc416089567dac7bcfa674b1cd6931c97 Mon Sep 17 00:00:00 2001 From: John Denker Date: Sun, 15 Jul 2012 05:22:05 -0700 Subject: untested possible implementation of exeunt ... kill peers as soon as we know the msg is spam --- tools/hi-q.c | 58 +++++++++++++++++++++++++++++++++++----------------------- 1 file changed, 35 insertions(+), 23 deletions(-) (limited to 'tools/hi-q.c') diff --git a/tools/hi-q.c b/tools/hi-q.c index 9d85b7a..8107e27 100644 --- a/tools/hi-q.c +++ b/tools/hi-q.c @@ -22,7 +22,8 @@ using namespace std; #include #include -// error exit codes, as stated in qmail.c +// error exit codes, mostly as stated in qmail.c +const int ex_good = 0; const int ex_spam = 21; const int ex_syserr = 71; const int ex_comerr = 74; @@ -392,7 +393,7 @@ int main(int argc, char** argv) { close(sync[rEnd]); close(0); // Housecleaning: the reading end of stdin was - // delegated to the first child, + // delegated to the first child, // so we don't need it. if (verbose) for (unsigned int ii = 0; ii < nkids; ii++) { @@ -406,33 +407,44 @@ int main(int argc, char** argv) { cerr << endl; } - for (unsigned int ii=0; ii