rnews: cant freopen No such file or directory
Sylvain Robitaille
syl at alcor.concordia.ca
Thu Dec 2 18:39:47 UTC 1999
Hello,
A few months ago, I switched our news server to different hardware
(essentially gaining me more RAM, newer faster CPUs, more disk space,
and more disk controllers). I should point out that I also upgraded the
OS at the same time, from Digital Unix 4.0b to Digital Unix 4.0e, (I
know -- don't make too many changes at once!). The news server software
was in fact recompiled under the new OS, in case that change would cause
difficulties.
The migration of the news server configuration and spools went mostly
smoothly, as I more or less copied entire directory trees from the old
disks to disks on the new system, (I use DEC's AdvFS on all but the news
spools, so much of this was really just a matter of "addvol newdisk &&
rmvol olddisk". The spools are a little more complicated, but their
migration was successfully completed).
In case it makes a difference, the server is inn-1.7, with
innfeed-0.10.1. It may seem ancient, but it's working very reliably, so
I haven't felt any need to upgrade.
Ever since the move to the new system though, I periodically get entries
like the following in my news.crit log file:
Dec 2 11:14:46 newsflash rnews: cant freopen No such file or directory
I'm assuming there should actually be a filename following "freopen",
the lack of which probably explains why the call is failing. In fact, I
see in frontends/rnews.c the following code snippet which is most
likely where my problem is:
872 if (freopen(av[0], "r", stdin) == NULL) {
873 syslog(L_FATAL, "cant freopen %s %m", av[0]);
874 exit(1);
875 }
av is the char * second argument to main, but it's been incremented
by optind following a loop around getopt (line 860). It should then be
pointing to a char array containing a file name, no? (At least, that's
the expectation, I'm sure).
Can it be that rnews is being called with a null filename as an argument?
I've tested, and found that if I do call rnews with a null first
argument (""), it logs a similar entry.
Can someone suggest anything that might help me figure out if rnews
really is being called with a null filename argument, and if so why?
Thanks for your time...
--
----------------------------------------------------------------------
Sylvain Robitaille syl at alcor.concordia.ca
Newsmaster Concordia University
Instructional & Information Technology Montreal, Quebec, Canada
----------------------------------------------------------------------
More information about the inn-workers
mailing list