Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!wuarchive!waikato.ac.nz!comp.vuw.ac.nz!mark Newsgroups: news.software.b Subject: Re: The anomolous handling of bad dates in cnews. Message-ID: <1991May17.054525.1640@comp.vuw.ac.nz> From: mark@comp.vuw.ac.nz (Mark Davies) Date: Fri, 17 May 1991 05:45:25 GMT Sender: news@comp.vuw.ac.nz (News Admin) References: <1991Apr25.181041.6023@mp.cs.niu.edu> <1991Apr25.223301.27280@world.std.com> <1991May16.211311.3544@eua.ericsson.se> Organization: Dept. of Comp. Sci., Victoria Uni. of Wellington, New Zealand. Nntp-Posting-Host: the-taj.comp.vuw.ac.nz Originator: mark@the-taj.comp.vuw.ac.nz Lines: 51 In article <1991May16.211311.3544@eua.ericsson.se>, per@erix.ericsson.se (Per Hedeland) writes: |> Btw, regarding inews rejecting articles - as far as I can determine |> (I tried an article with no Newsgroups: line), inews -W will exit |> with |> status 0 even if the posting failed - this causes e.g. NNTP postings |> to |> always appear as "successful". I had this problem under HP-UX 7.0. I think its a bug in HP-UX's /bin/sh. The exit status of the subshell is not being correctly passed to the parent. Since we always invoke inews with the -W option (from nntp) I just made the following patch to inews. *** inews.cnews Wed Apr 17 16:32:11 1991 --- inews Wed Apr 17 21:37:28 1991 *************** *** 8,13 **** --- 8,16 ---- # Yes, it's big, slow and awkward. The alternative is casting a lot of # local policy in C. # TODO: rewrite Date: and Expires: dates + # + # Hacked to effectively always have "-W" on + # so that exit status is reported correctly in hp-ux # =()<. ${NEWSCONFIG-@@}>()= . ${NEWSCONFIG-/usr/lib/news/bin/config} *************** *** 372,378 **** ;; esac exit $status # trap 0 may cleanup, make dead.article ! ) & ! eval $waitcmd # wait & get status if -W given trap 0 # let the background run on unmolested exit $status --- 375,381 ---- ;; esac exit $status # trap 0 may cleanup, make dead.article ! ) ! status=$? # wait & get status if -W given trap 0 # let the background run on unmolested exit $status cheers mark