Message-ID: From: Michel de Ruiter To: "'djgpp-workers AT delorie DOT com'" Cc: Eli Zaretskii , "'Laurynas Biveinis'" Subject: RE: First alpha symlink patch Date: Tue, 16 Nov 1999 09:49:03 +0100 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2650.21) Content-Type: text/plain; charset="iso-8859-4" Reply-To: djgpp-workers AT delorie DOT com > > Are getwd and getcwd documented somewhere to return the > > symlink name, rather than the actual directory name? If not, > > perhaps we are better off without recording the symlink in > > some hidden variable? > It's up to implementation. If we do or do not do that we got following > difference, as pointed out by Alain when we discussed it earlier: > -------- > When you say chdir() should be adjust, how ? see two different > behaviours below (Solaris vs GNU/Linux) of chdir() : Are you sure this difference is not because of a different configuration of Bash? IIRC, Bash has an option to change its behaviour regarding this. From a (probably old) Bash Info-file: Node: Bash Variables ... `nolinks' If present, says not to follow symbolic links when doing commands that change the current working directory. By default, bash follows the logical chain of directories when performing commands such as `cd' which change the current directory. For example, if `/usr/sys' is a link to `/usr/local/sys' then: $ cd /usr/sys; echo $PWD /usr/sys $ cd ..; pwd /usr If `nolinks' exists, then: $ cd /usr/sys; echo $PWD /usr/local/sys $ cd ..; pwd /usr/local See also the description of the `-P' option to the `set' builtin, *Note The Set Builtin::. ... Node: The Set Builtin ... `-P' If set, do not follow symbolic links when performing commands such as `cd' which change the current directory. The physical directory is used instead. Maybe we should leave this option to Bash, not libc. Groente, Michel.