 | | Fortunately, the designers of System V UNIX recognized this and began working to reverse the trend of piling everything onto ioctl. They created the fcntl function, and moved all of the operations on regular files and file descriptors out of ioctl's area of responsibility. However, even the best laid plans don't go as well as they ought to. Because many vendors' operating systems were based on Berkeley UNIX, even though most of the vendors adopted fcntl (especially once it became a part of the POSIX standard), they still left some functionality under ioctl. Thus, most versions of UNIX, and SVR4 is no exception, use both ioctl and fcntl to perform operations on files and file descriptors, with some overlap for reasons of backward compatibility. | |
|