Article View: news.software.nntp
Article #2079[SOLUTION] INN 1.3 news.daily hangs
From: Arjan de Vet
Date: Wed, 11 Aug 1993 17:04
Date: Wed, 11 Aug 1993 17:04
59 lines
2956 bytes
2956 bytes
In article <24ao3u$ru7@mudos.ann-arbor.mi.us>,
Marc Unangst <mju@mudos.ann-arbor.mi.us> wrote:
>I'm having the same problem, also running under Linux 0.99pl11. To be
>more exact, the news.daily script blocks for input from stdin
>immediately after executing the shlock command. Hitting ^D *twice* on
>stdin (the first one just prints "^D") causes the shell to print
>"Syntax error" on stderr and exit. The problem seems to be related to
>the file-descriptor redirection done by the "exec 3>&1 >/tmp/file
>2>&1" statement a bit earlier in the script. If this exec statement
>is removed, the script runs to completion; of course, the report then
>goes to stdout rather than to a temporary file. This is probably a
>bug in Bash, but I haven't tried to track it down yet.
Yes, it's a bug in bash 1.12 and I just found the patch I got from Chet
Ramey (one of the authors of bash) to fix this bug:
-----------------------------------------------------------------------------
*** shell.c.orig Tue Jan 21 00:52:37 1992
--- shell.c Thu Feb 25 07:39:09 1993
***************
*** 706,709 ****
--- 706,720 ----
}
+ {
+ int script_fd;
+
+ script_fd = dup2 (fd, getdtablesize () - 1);
+ if (script_fd)
+ {
+ close (fd);
+ fd = script_fd;
+ }
+ }
+
default_input = fdopen (fd, "r");
-----------------------------------------------------------------------------
There may be still a problem with the scripts which handle control
messages (e.g., newgroup) with bash-1.12 because of the following line:
. /usr/lib/news/parsecontrol "$@"
You can solve that by replacing this line by the contents of the
parsecontrol script itself.
Both bugs have been fixed in the (private) development version of
bash-1.13cwru.
I'll add these remarks to my inn-1.4-linux.tar.gz file on
ftp.win.tue.nl:/pub/linux/ports/.
Arjan
--
Arjan de Vet <Arjan.de.Vet@adv.win.tue.nl> (home)
Eindhoven University of Technology, the Netherlands <devet@win.tue.nl> (work)
Technical Details
Message-ID:
<24b8qj$fa@adv.win.tue.nl>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!mbox2nntp-comp.os.linux.mbox.zip!gmd.de!xlink.net!math.fu-berlin.de!umn.edu!news-feed-1.peachnet.edu!darwin.sura.net!howland.reston.ans.net!agate!doc.ic.ac.uk!uknet!mcsun!sun4nl!tuegate.tue.nl!svin09.info.win.tue.nl!adv.win.tue.nl!adv.win.tue.nl!not-for-mailReferences:
<2491om$37@paperboy.ids.net> <24ao3u$ru7@mudos.ann-arbor.mi.us>Show Full Headers
Complete Article Headers
Message-ID: <24b8qj$fa@adv.win.tue.nl> Subject: [SOLUTION] INN 1.3 news.daily hangs Date: Wed, 11 Aug 1993 17:04:19 +0000 From: devet@adv.win.tue.nl (Arjan de Vet) References: <2491om$37@paperboy.ids.net> <24ao3u$ru7@mudos.ann-arbor.mi.us> Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!mbox2nntp-comp.os.linux.mbox.zip!gmd.de!xlink.net!math.fu-berlin.de!umn.edu!news-feed-1.peachnet.edu!darwin.sura.net!howland.reston.ans.net!agate!doc.ic.ac.uk!uknet!mcsun!sun4nl!tuegate.tue.nl!svin09.info.win.tue.nl!adv.win.tue.nl!adv.win.tue.nl!not-for-mail Newsgroups: news.software.nntp,comp.os.linux Organization: Eindhoven University of Technology, the Netherlands Lines: 58 Distribution: inet NNTP-Posting-Host: adv.win.tue.nl