mirror of https://github.com/mkerrisk/man-pages
attributes.7: Comment out 'fd' text
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
parent
06f3aba645
commit
04c95a3bb5
|
@ -725,48 +725,48 @@ running or asynchronous signals are enabled,
|
||||||
and so the data structure can be considered
|
and so the data structure can be considered
|
||||||
effectively constant in these contexts,
|
effectively constant in these contexts,
|
||||||
which makes the former safe.
|
which makes the former safe.
|
||||||
.TP
|
.\" .TP
|
||||||
.I fd
|
.\" .I fd
|
||||||
Functions annotated with
|
.\" Functions annotated with
|
||||||
.I fd
|
.\" .I fd
|
||||||
as an AC-Safety issue may leak file
|
.\" as an AC-Safety issue may leak file
|
||||||
descriptors if asynchronous thread cancellation interrupts their
|
.\" descriptors if asynchronous thread cancellation interrupts their
|
||||||
execution.
|
.\" execution.
|
||||||
|
.\"
|
||||||
Functions that allocate or deallocate file descriptors will generally be
|
.\" Functions that allocate or deallocate file descriptors will generally be
|
||||||
marked as such.
|
.\" marked as such.
|
||||||
Even if they attempted to protect the file descriptor
|
.\" Even if they attempted to protect the file descriptor
|
||||||
allocation and deallocation with cleanup regions,
|
.\" allocation and deallocation with cleanup regions,
|
||||||
allocating a new descriptor and storing its number where the cleanup region
|
.\" allocating a new descriptor and storing its number where the cleanup region
|
||||||
could release it cannot be performed as a single atomic operation.
|
.\" could release it cannot be performed as a single atomic operation.
|
||||||
Similarly,
|
.\" Similarly,
|
||||||
releasing the descriptor and taking it out of the data structure
|
.\" releasing the descriptor and taking it out of the data structure
|
||||||
normally responsible for releasing it cannot be performed atomically.
|
.\" normally responsible for releasing it cannot be performed atomically.
|
||||||
There will always be a window in which the descriptor cannot be released
|
.\" There will always be a window in which the descriptor cannot be released
|
||||||
because it was not stored in the cleanup handler argument yet,
|
.\" because it was not stored in the cleanup handler argument yet,
|
||||||
or it was already taken out before releasing it.
|
.\" or it was already taken out before releasing it.
|
||||||
It cannot be taken out after release:
|
.\" .\" It cannot be taken out after release:
|
||||||
an open descriptor could mean either that the descriptor still
|
.\" an open descriptor could mean either that the descriptor still
|
||||||
has to be closed,
|
.\" has to be closed,
|
||||||
or that it already did so but the descriptor was
|
.\" or that it already did so but the descriptor was
|
||||||
reallocated by another thread or signal handler.
|
.\" reallocated by another thread or signal handler.
|
||||||
|
.\"
|
||||||
Such leaks could be internally avoided, with some performance penalty,
|
.\" Such leaks could be internally avoided, with some performance penalty,
|
||||||
by temporarily disabling asynchronous thread cancellation.
|
.\" by temporarily disabling asynchronous thread cancellation.
|
||||||
However,
|
.\" However,
|
||||||
since callers of allocation or deallocation functions would have to do
|
.\" since callers of allocation or deallocation functions would have to do
|
||||||
this themselves, to avoid the same sort of leak in their own layer,
|
.\" this themselves, to avoid the same sort of leak in their own layer,
|
||||||
it makes more sense for the library to assume they are taking care of it
|
.\" it makes more sense for the library to assume they are taking care of it
|
||||||
than to impose a performance penalty that is redundant when the problem
|
.\" than to impose a performance penalty that is redundant when the problem
|
||||||
is solved in upper layers, and insufficient when it is not.
|
.\" is solved in upper layers, and insufficient when it is not.
|
||||||
|
.\"
|
||||||
This remark by itself does not cause a function to be regarded as
|
.\" This remark by itself does not cause a function to be regarded as
|
||||||
AC-Unsafe.
|
.\" AC-Unsafe.
|
||||||
However, cumulative effects of such leaks may pose a
|
.\" However, cumulative effects of such leaks may pose a
|
||||||
problem for some programs.
|
.\" problem for some programs.
|
||||||
If this is the case,
|
.\" If this is the case,
|
||||||
suspending asynchronous cancellation for the duration of calls
|
.\" suspending asynchronous cancellation for the duration of calls
|
||||||
to such functions is recommended.
|
.\" to such functions is recommended.
|
||||||
.TP
|
.TP
|
||||||
.I mem
|
.I mem
|
||||||
Functions annotated with
|
Functions annotated with
|
||||||
|
|
Loading…
Reference in New Issue