Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 16 Feb 1996 21:43:59 +1100
From:      Bruce Evans <bde@zeta.org.au>
To:        freebsd-bugs@freefall.freebsd.org, j@uriah.heep.sax.de
Subject:   Re: bin/1029: weird behavior after mounting
Message-ID:  <199602161043.VAA06609@godzilla.zeta.org.au>

next in thread | raw e-mail | index | archive | help
> > 	cd /cdrom
> > 	ls
> > 	[Nothing -- cdrom is not mounted]
> > 	mount /cdrom
> 
> I think this should fail with an EBUSY.

Directories are almost never busy in FreeBSD.  E.g.,

	cd /cdrom
	ls
	[Nothing -- cdrom is not mounted]
	mkdir foo
	cd foo
	rmdir .
	[rmdir: .: Invalid argument]	# failure for superstitious reasons
	rmdir /cdrom/foo		# succeeds
	/bin/pwd
	[pwd: No such file or directory]	# duh, which file or directory?

Any other behaviour would be surprising (and the failure to remove "."
is surprising) because it's the inodes that may be busy, not the directory
entries that point to them.

Not failing with EBUSY for union mounts may actually be useful.

Bruce



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199602161043.VAA06609>