Path: utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!uunet!zaphod.mps.ohio-state.edu!mips!daver!tscs!tct!chip From: chip@tct.com (Chip Salzenberg) Newsgroups: news.software.b Subject: Re: C News batcher goes insane - film at eleven Message-ID: <286B53CC.542B@tct.com> Date: 28 Jun 91 15:20:43 GMT References: <1991Jun26.035746.14008@alembic.acs.com> Organization: TC Telemanagement, Clearwater, FL Lines: 46 According to csu@alembic.acs.com (Dave Mack): >After staring at the code in sendbatches and batcher for a while, >I suspect that a major rewrite of sendbatches would be necessary >to fix this. Not at all. Just have sendbatches check for and throw away any zero-length batches before compression/transmission. Here are diffs: Index: sendbatches *************** *** 153,156 **** --- 153,164 ---- for f in $them do + # Verify that at least one file in the batch exists. + # If not, ignore the batch. + any= + for ff in `sed 's/ .*$//' $f` + do + test -f $ff && { any=yes; break; } + done + # Sigh... sh -x on this won't work, because the -x # output ends up in /tmp/nb$$, and there is no way *************** *** 159,164 **** # processes in a pipeline) or (b) turn off -x for # a moment in a portable way. ! ( ( cd $NEWSARTS ; $batcher $here/$f ) | $muncher | ! $sender $sys ) >/tmp/nb$$ 2>&1 if test $? -eq 0 -a ! -s /tmp/nb$$ then --- 167,175 ---- # processes in a pipeline) or (b) turn off -x for # a moment in a portable way. ! if test -n "$any" ! then ! ( ( cd $NEWSARTS ; $batcher $here/$f ) | ! $muncher | $sender $sys ) ! fi >/tmp/nb$$ 2>&1 if test $? -eq 0 -a ! -s /tmp/nb$$ then -- Chip Salzenberg at Teltronics/TCT , "I want to mention that my opinions whether real or not are MY opinions." -- the inevitable William "Billy" Steinmetz