Re: CD writing in future Linux (stirring up a hornets' nest)

From: Phillip Susi
Date: Sun Feb 05 2006 - 11:13:49 EST


Jan Engelhardt wrote:
I would say we all forgot to RTFM. Because O_EXCL does nothing *unless* O_CREAT is specified, which probably *is not* specified in cdrecord or hal. There is no reason to have hal or cdrecord create a device node - which you can't do with open() anyway.


I think you are misinterpreting the man page, because it isn't worded very clearly. It should not even mention O_CREAT because it has nothing to do with O_EXCL; it is just repeating the semantics of O_CREAT ( if the file already exists, the call fails ) which would of course, apply if you do use O_CREAT in conjunction with any other flag including O_EXCL. It does not say that you must use O_EXCL with O_CREAT. The rest of the description talks about using lockfiles as an alternative to ensure exclusive access to the file on NFS where O_EXCL is broken. The intent of O_EXCL is clearly to provide the caller with exclusive access to the file.



-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/