Penguin
Annotated edit history of ENOTDIR version 2, including all changes. View license author blame.
Rev Author # Line
1 PerryLorier 1 !!!Not a directory
2
3 You are trying to do something to a file where a directory would be expected. eg:
4 chdir("/etc/motd");
5 This more frequently (and confusingly) occurs when you are refering to a file, where you would expect a file to work, but the directory path is wrong, eg:
6 fopen("/etc/motd/foo","r");
7 because "/etc/motd" is a file, not a directory, and therefore can't "contain" "/foo".
2 PerryLorier 8
9 This can happen when creating a unix domain socket with socket(2) and bind(2) or connect(2) for the same reason, (you're trying to create a socket like /etc/motd/foo where motd is a file not a directory).