Article View: news.software.nntp
Article #11642Re: crosspost bugs
From: 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_______
Technical Details
Message-ID:
<Pine.LNX.3.95.961014150039.29108y-100000@yoda.fdt.net>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!not-for-mailReferences:
<Pine.LNX.3.95.961014002005.29108n-100000@yoda.fdt.net>Show Full Headers
Complete Article Headers
Message-ID: <Pine.LNX.3.95.961014150039.29108y-100000@yoda.fdt.net> Subject: Re: crosspost bugs Date: Mon, 14 Oct 1996 00:00:00 +0000 From: Fu Bar <fubar@gnv.fdt.net> References: <Pine.LNX.3.95.961014002005.29108n-100000@yoda.fdt.net> Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!not-for-mail X-Deja-AN: 189397789 Distribution: inet To: jerry@olivetti.com Cc: inn-bugs@isc.org X-sender: fubar@yoda.fdt.net Content-type: TEXT/PLAIN; charset=US-ASCII Organization: Florida Digital Turnpike Mime-version: 1.0 Newsgroups: news.software.nntp