On Fri, 02 Sep 2011 08:57:41 +0400 Michael Tokarev <m...@tls.msk.ru> wrote:
> Yes, that's the most obvious thing to do - to ignore certain errors, > or maybe even _all_ errors in this place - it is one of very rare > cases where error handling actually may be omitted ;) It was actually a little more complicated than that. I had read that readlink() returns NULL here on Solaris so the best thing to do there was use /proc/N/cwd without following the link. But ignoring the error causes problems later on in Linux, as you've found, so I've had to check that too. I don't know whether it still works in Solaris :-/. > And yes I'm certain that previous versions had no such issue - it > always opened new window in "previous" directory in such situation. > It actually wasn't always a good idea anyway: eg, I can run "su" from > some "random" directory (it will go stright to root's $HOME), but > roxterm will continue to open new tabs/windows in that "random" > directory, even if it makes no sence anymore. I understand that > roxterm just can't know if that's the case - with older way to track > current dir changes. But that's all history now. It now passes NULL to the spawn function. I assumed that would cause it to use whatever the cwd was when roxterm was launched, regardless of what other terminals have been using, but that doesn't seem to be the case: 1. Open a terminal (starting cwd = ~); cd roxterm 2. Open a new tab; cd src; exec su 3. Open a new tab: cwd is roxterm Quite unexpected! So I think using $HOME would be a good idea. -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org