Differences between current version and previous revision of ENOTDIR.
Other diffs: Previous Major Revision, Previous Author, or view the Annotated Edit History
Newer page: | version 2 | Last edited on Saturday, December 4, 2004 2:31:31 am | by PerryLorier | |
Older page: | version 1 | Last edited on Wednesday, October 30, 2002 11:00:22 am | by PerryLorier | Revert |
@@ -4,4 +4,6 @@
chdir("/etc/motd");
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:
fopen("/etc/motd/foo","r");
because "/etc/motd" is a file, not a directory, and therefore can't "contain" "/foo".
+
+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).