Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!iuvax!ux1.cso.uiuc.edu!deimos!sirius.cis.ksu.edu!tar From: tar@sirius.cis.ksu.edu (Tim Ramsey) Newsgroups: news.software.nntp Subject: Cnews and nntp 1.5.7 gotchas under SysV Message-ID: <1989Dec23.035953.21905@deimos.cis.ksu.edu> Date: 23 Dec 89 03:59:53 GMT Sender: news@deimos.cis.ksu.edu (USENET News Admin) Reply-To: tar@ksuvax1.cis.ksu.edu (Tim Ramsey) Organization: Kansas State University, Dept of Computing & Information Sciences Lines: 46 Hi all. Recently, I changed my news transport from B 2.11.17 / nntp 1.5.3 to C news (14-Sep-1989) / nntp 1.5.7. My OS is sysV 2.1.2, and I've #defined DBM, CNEWS, and BATCHED_INPUT in ./nntp/common/conf.h. I ran into some gotchas, most of which I managed to get around. I'm curious if others with similar setups have had the same problems, and if so, how they handled them. First, ./nntp/server/spawn.c assumes that the spawnee is execl'able. If the spawnee is a shell script and your kernel doesn't understand the "#!" magic number, this isn't true. I found this when I tried to post an article and the NNTP server attempted to spawn inews. With B news, this works since inews is object code. With C news, it's a shell script. My fix was to check if errno == ENOEXEC (exec format error). If so, I spawn /bin/sh with argv[1] set to the pathname of the spawnee. I had to make this change in batch.c since newsrun is a shell script too. Unfortunately, this fix caused the fake inews to block for a long time waiting for the server to respond to the POST command. The server seemed to be blocked waiting for input from the spawned process. I was too frazzled from the fight with C news to track this down, so I just ifdef'd out the code that reads stdout from the spawned process. As a result, posting no longer causes the fake inews to block, but the user does not get to see any errors returned by inews on the server. Second, Cnews allows a "x" or "=news.group" in the active file. I attempted to use the "x" flag to block some unwanted groups (like alt.sex.bestiality). When I started up rn, it asked me if I wanted to add the new group "alt.sex.bestiality" to my .newsrc. This is not what I had intended. I haven't gotten around to fixing this yet. When I do, I'll probably have to hunt around the server code for things that deal with the active file and make them ignore lines that have the "x" or "=" flags (if CNEWS is #defined). Has anyone else run into these problems? Are there patches that I've missed that deal with them? Any wisdom? Thanks, Tim -- "Desperately trying..." -- Edie Dept. of Computing and Information Sciences BITNET: tar@KSUVAX1 Kansas State University, Manhattan KS 66506 Internet: tar@ksuvax1.cis.ksu.edu Voice: (913) 532-6350 UUCP: ...!{rutgers,texbell}!ksuvax1!tar Fax: (913) 532-7114