> On 15-Dec-98 Miquel van Smoorenburg wrote:
> >>that's because open on "" is the same as open on "."
> >
> > Under *BSD, yes. Under Linux, no.
> >
> > % cat ""
> > cat: : No such file or directory
> > % cat .
> > cat: .: Is a directory
>
> sorry, i was referring to v6
> i haven't actually checked
> anyway, cat is not a good enough test
> what does open(2) do?
strace is your friend:
# strace -e open cat ""
open("/etc/ld.so.cache", O_RDONLY) = 3
open("/lib/libc.so.5", O_RDONLY) = 3
open("/usr/share/locale/locale.alias", O_RDONLY) = 3
open("/usr/share/i18n/locale.alias", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/de_DE/LC_CTYPE", O_RDONLY) = 3
===> open("", O_RDONLY) = -1 ENOENT (No such file or directory)
cat: : No such file or directory
Harald
-- All SCSI disks will from now on ___ _____ be required to send an email notice 0--,| /OOOOOOO\ 24 hours prior to complete hardware failure! <_/ / /OOOOOOOOOOO\ \ \/OOOOOOOOOOOOOOO\ \ OOOOOOOOOOOOOOOOO|// Harald Koenig, \/\/\/\/\/\/\/\/\/ Inst.f.Theoret.Astrophysik // / \\ \ koenig@tat.physik.uni-tuebingen.de ^^^^^ ^^^^^- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/