pthread cancellation points missing for fdatasync and lockf in some cases

Mike Frysinger vapier@gentoo.org
Sat May 5 08:15:00 GMT 2007


POSIX requires fdatasync() and lockf() be pthread cancellation endpoints but 
it looks like they get missed a little in glibc ...

fdatasync() is generated for Linux simply via syscalls.list as a pass through 
to the kernel... the generic case in misc/fdatasync.c relies on fsync() being 
a cancellation endpoint ... so here, just Linux is broken it seems

as for lockf(), this seems to be [incorrectly] done on purpose ... io/lockf.c 
talks about relying on fcntl()'s cancellation endpoint when called with 
F_SETLKW as that is the only case that POSIX says fcntl() should be a 
cancellation endpoint ... however, POSIX does not grant this limitation to 
lockf() ... it should always be a cancellation endpoint regardless of the 
arguments it is called with
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 827 bytes
Desc: This is a digitally signed message part.
URL: <http://sourceware.org/pipermail/libc-alpha/attachments/20070505/d3469971/attachment.sig>


More information about the Libc-alpha mailing list