Thread View: news.software.nntp
2 messages
2 total messages
Started by Fu Bar
Mon, 14 Oct 1996 00:00
crosspost bugs
Author: Fu Bar
Date: Mon, 14 Oct 1996 00:00
Date: Mon, 14 Oct 1996 00:00
30 lines
1566 bytes
1566 bytes
I'm running inn unoff4 plus some additional patches on linux 2.0.22 (plus
some additional patches :), and just setup crosspost today. I noticed
that by default crosspost does an fsync on every first article. Is there a
reason for that? It seems to run faster without the fsync.
I noticed the -s option for not fsyncing, tried it, and found that it made
crosspost not work. It turns out, this is a bug in the getopt() in
crosspost.
The line:
while ((i = getopt(ac, av, "Dds:")) != EOF)
should be:
while ((i = getopt(ac, av, "D:ds")) != EOF)
Good thing I wasn't trying to use the -D arg :)
Was this a known bug? I see no mention of it at the UNOFF web site.
I didn't want to recompile it just now, so I'm running with:
crosspost:*:Tc,Ap,WR:/usr/local/news/bin/crosspost -s duh
Also, the man page for crosspost is missing a comma in the flags. It
suggests:
crosspost:*:Tc,ApWR:/usr/local/news/bin/crosspost
Re: crosspost bugs
Author: Fu Bar
Date: Mon, 14 Oct 1996 00:00
Date: Mon, 14 Oct 1996 00:00
29 lines
1989 bytes
1989 bytes
I've been looking more at crosspost, and am wondering about some of the
logic in it. If I strace the crosspost process, I see things like this:
link("alt/sex/strip-clubs/64585", "soc/men/263118") = -1 EXDEV
(Cross-device link)
mkdir("soc/men", 0775) = -1 EEXIST (File exists)
stat("soc/men", {st_mode=S_IFDIR|0775, st_size=45056, ...}) = 0
link("alt/sex/strip-clubs/64585", "soc/men/263118") = -1 EXDEV
(Cross-device link)
symlink("/var/spool/news/alt/sex/strip-clubs/64585", "soc/men/263118") = 0
It looks like crosspost first tries to make a hard link. Then if that
fails, it assumed the destination directory might not exist, tries to
mkdir it, then tries to hard link again, then if that fails again, it
falls back to symlink.
Wouldn't it make more sense to jump straight to trying a symlink if
errno = EXDEV or EPERM? Then, if the symlink fails, try to mkdir the
destination, and symlink again and if it fails again just report failure?
------------------------------------------------------------------
Jon Lewis <jlewis@fdt.net> | Unsolicited commercial e-mail will
Network Administrator | be proof-read for $199/hr.
________Finger jlewis@inorganic5.fdt.net for PGP public key_______
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads