FreeBSD 6.3: fd = open("test", O_WRONLY | O_CREAT | O_EXCL, 0777); n = extattr_set_fd(fd, EXTATTR_NAMESPACE_USER, "testattr", "1234", 4); After this, fd=3, n is non-zero, errno = 9 (EBADF) Huh? I would have expected EOPNOTSUPP if extended attributes weren't supported on this filesystem. The file descriptor is clearly valid. Tim