From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from scc-mailout.scc.kit.edu (scc-mailout.scc.kit.edu [129.13.185.202]) by krisdoz.my.domain (8.14.3/8.14.3) with ESMTP id pB81YVLn013827 for ; Wed, 7 Dec 2011 20:34:31 -0500 (EST) Received: from hekate.usta.de (asta-nat.asta.uni-karlsruhe.de [172.22.63.82]) by scc-mailout-02.scc.kit.edu with esmtp (Exim 4.72 #1) id 1RYSsY-0001k0-5H; Thu, 08 Dec 2011 02:34:30 +0100 Received: from donnerwolke.usta.de ([172.24.96.3]) by hekate.usta.de with esmtp (Exim 4.72) (envelope-from ) id 1RYSsY-00021S-59 for tech@mdocml.bsd.lv; Thu, 08 Dec 2011 02:34:30 +0100 Received: from iris.usta.de ([172.24.96.5] helo=usta.de) by donnerwolke.usta.de with esmtp (Exim 4.72) (envelope-from ) id 1RYSsY-0003bq-42 for tech@mdocml.bsd.lv; Thu, 08 Dec 2011 02:34:30 +0100 Received: from schwarze by usta.de with local (Exim 4.72) (envelope-from ) id 1RYSsY-0002SP-38 for tech@mdocml.bsd.lv; Thu, 08 Dec 2011 02:34:30 +0100 Date: Thu, 8 Dec 2011 02:34:30 +0100 From: Ingo Schwarze To: tech@mdocml.bsd.lv Subject: Re: chdir() in mandocdb Message-ID: <20111208013430.GD19643@iris.usta.de> References: <4EDF49CE.3040508@bsd.lv> X-Mailinglist: mdocml-tech Reply-To: tech@mdocml.bsd.lv MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4EDF49CE.3040508@bsd.lv> User-Agent: Mutt/1.5.21 (2010-09-15) Hi Kristaps, Kristaps Dzonsons wrote on Wed, Dec 07, 2011 at 12:11:10PM +0100: > 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/XUngrabDevice.3 That was a bug in Xenocara, i fixed it here: http://www.openbsd.org/cgi-bin/cvsweb/xenocara/lib/libXi/man/ \ XIUngrabDevice.man > /usr/X11R6/man/man3/XTranslateCoordinates.3 > /usr/X11R6/man/man3/Xaw.3 > ... These are not .so on my -current system, not sure whether there is any problem; it doesn't seem so on first sight. > All of these have an `so' in the current directory. Looking at > roff(7) for `so', this is the correct behaviour. No; the roff(7) manual muddles the point. What it says is correct, but only makes sense when you already know that man(1) does a chdir(2) to the root of the tree. > However, this means that the chdir() should be for each file, > not the current directory No! Look for the string "chdir(buf)" in the file /usr/src/usr.bin/man/man.c to understand what's really happening. > Thoughts? Please don't break this, it's fragile. Yours, Ingo -- To unsubscribe send an email to tech+unsubscribe@mdocml.bsd.lv