When I install package bash, the following message appears on my teletype:
I go to the man page for fdescfs, and it gives me the following purpose for the existence of fdescfs:
So why does bash bother with this? Why doesn't it just do the fcntl?
I'm sure there's a reason; I just want to know what that reason is, and why I should need to mess with /etc/fstab.
Code:
======================================================================
bash requires fdescfs(5) mounted on /dev/fd
If you have not done it yet, please do the following:
mount -t fdescfs fdesc /dev/fd
To make it permanent, you need the following lines in /etc/fstab:
fdesc /dev/fd fdescfs rw 0 0
======================================================================
Code:
If the file descriptor is open and the
mode the file is being opened with is a subset of the mode of the exist-
ing descriptor, the call:
fd = open("/dev/fd/0", mode);
and the call:
fd = fcntl(0, F_DUPFD, 0);
are equivalent.
I'm sure there's a reason; I just want to know what that reason is, and why I should need to mess with /etc/fstab.