From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp-1.sys.kth.se (smtp-1.sys.kth.se [130.237.32.175]) by krisdoz.my.domain (8.14.3/8.14.3) with ESMTP id pB7BBlG2031287 for ; Wed, 7 Dec 2011 06:11:49 -0500 (EST) Received: from mailscan-1.sys.kth.se (mailscan-1.sys.kth.se [130.237.32.91]) by smtp-1.sys.kth.se (Postfix) with ESMTP id 1B402156B67 for ; Wed, 7 Dec 2011 12:11:42 +0100 (CET) X-Virus-Scanned: by amavisd-new at kth.se Received: from smtp-1.sys.kth.se ([130.237.32.175]) by mailscan-1.sys.kth.se (mailscan-1.sys.kth.se [130.237.32.91]) (amavisd-new, port 10024) with LMTP id D983xmvR77wH for ; Wed, 7 Dec 2011 12:11:11 +0100 (CET) X-KTH-Auth: kristaps [193.10.49.5] X-KTH-mail-from: kristaps@bsd.lv X-KTH-rcpt-to: tech@mdocml.bsd.lv Received: from ctime.hhs.se (ctime.hhs.se [193.10.49.5]) by smtp-1.sys.kth.se (Postfix) with ESMTP id 6FFB4156B66 for ; Wed, 7 Dec 2011 12:11:10 +0100 (CET) Message-ID: <4EDF49CE.3040508@bsd.lv> Date: Wed, 07 Dec 2011 12:11:10 +0100 From: Kristaps Dzonsons User-Agent: Mozilla/5.0 (X11; OpenBSD amd64; rv:5.0) Gecko/20110805 Thunderbird/5.0 X-Mailinglist: mdocml-tech Reply-To: tech@mdocml.bsd.lv MIME-Version: 1.0 To: tech@mdocml.bsd.lv Subject: chdir() in mandocdb Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Hi, I notice that the chdir() for mandocdb()'s OP_NEW is into the base directory of the manuals (e.g., /usr/share/man). However, when I run mandocdb over OpenBSD 5.0, I see a few inconsistencies: /usr/X11R6/man/man3/XTranslateCoordinates.3 /usr/X11R6/man/man3/XUngrabDevice.3 /usr/X11R6/man/man3/Xaw.3 ... All of these have an `so' in the current directory. Looking at roff(7) for `so', this is the correct behaviour. However, this means that the chdir() should be for each file, not the current directory (of course, to avoid overhead we'll keep a buffer of the current chdir() and avoid calling chdir() for the same directory over and over again). Thoughts? Kristaps P.S., note that man.cgi is mature enough that, if catman(8) is run, man.cgi can be dropped into /cgi-bin and works properly. It also works fine in non-jailed cgi directories, like my ~/public_html. It's not pretty [yet], but it's quite functional. I'll switch over to it exclusively for manuals and flush out bugs that way for a while. -- To unsubscribe send an email to tech+unsubscribe@mdocml.bsd.lv