[DragonFlyBSD - Bug #243] weird behavior in the shell

sigttou bugtracker-admin at leaf.dragonflybsd.org
Fri Oct 2 03:48:32 PDT 2026


Issue #243 has been updated by sigttou.


Looking through the lowest number issues here, and that's a fun one, it's a hash collision ;-) Still reproducible.

tcsh uses 1024 hash buckets. Both "." and "resident" hash to 46, so /usr/sbin/resident makes the command cache think "." might be in /usr/sbin. With a shorter PATH, another collision ("notty") makes it report /bin/. instead.

It's not a DragonFly-specific bug.

----------------------------------------
Bug #243: weird behavior in the shell
http://bugs.dragonflybsd.org/issues/243#change-14740

* Author: swildner
* Status: Feedback
* Priority: Normal
* Target version: 6.4
----------------------------------------
Hi,

I'm not sure if this is a 'real' bug but I'm curious if anyone knows the 
cause. Check this:

zoot# echo $PATH
/sbin:/bin:/usr/sbin:/usr/bin:/usr/games:/usr/local/sbin:/usr/local/bin:/usr/pkg/bin:/usr/pkg/sbin:/usr/pkg/xorg/bin:/home/s/bin
zoot# pwd
/usr/src/sys/dev/disk/md
zoot# .
/usr/sbin/.: Permission denied.
zoot# cd /
zoot# .
/usr/sbin/.: Permission denied.

In other words: The strange thing is that whereever I type . on the csh 
prompt, I get the /usr/sbin/.: message regardless of what my current 
directory is.

On a Solaris system I get ".: Permission denied." which is what I'd 
expect rather.

So, can anyone enlighten me why DragonFly behaves like that?

Sascha



-- 
You have received this notification because you have either subscribed to it, or are involved in it.
To change your notification preferences, please click here: http://bugs.dragonflybsd.org/my/account


More information about the Bugs mailing list