diff options
Diffstat (limited to 'man7')
| -rw-r--r-- | man7/pthreads.7 | 9 | ||||
| -rw-r--r-- | man7/signal-safety.7 | 5 |
2 files changed, 14 insertions, 0 deletions
diff --git a/man7/pthreads.7 b/man7/pthreads.7 index 06417d503a..b39236c398 100644 --- a/man7/pthreads.7 +++ b/man7/pthreads.7 @@ -564,6 +564,15 @@ not specified in the standard as cancellation points. In particular, an implementation is likely to mark any nonstandard function that may block as a cancellation point. (This includes most functions that can touch files.) +.in +.PP +It should be noted that even if an application is not using +asynchronous cancellation, that calling a function from the above list +from an asynchronous signal handler may cause the equivalent of +asynchronous cancellation. The underlying user code may not expect +asynchronous cancellation and the state of the user data may become +inconsistent. Therefore signals should be used with caution when +entering a region of deferred cancellation. .\" So, scanning "cancellation point" comments in the glibc 2.8 header .\" files, it looks as though at least the following nonstandard .\" functions are cancellation points: diff --git a/man7/signal-safety.7 b/man7/signal-safety.7 index 3879a5aefb..051702b76a 100644 --- a/man7/signal-safety.7 +++ b/man7/signal-safety.7 @@ -314,6 +314,11 @@ is likely to remove .BR fork (2) from the list of async-signal-safe functions. .\" +.IP * 3 +Asynchronous signal handlers that call functions which are cancellation +points and nest over regions of deferred cancellation may trigger +cancellation whose behavior is as-if asynchronous cancellation had +occurred and may cause application state to become inconsistent. .SS Deviations in the GNU C library The following known deviations from the standard occur in the GNU C library: |
