Hi http://www.kernel.org/doc/man-pages/online/pages/man3/lockf.3.html says: EBADF fd is not an open file descriptor. However it can also happen if the file descriptor is open, but not for writing. The POSIX docs say this http://pubs.opengroup.org/onlinepubs/009695399/functions/lockf.html and a simple test program confirms it is the case. -- To unsubscribe from this list: send the line "unsubscribe linux-man" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html