Skip to content

Commit e4098f4

Browse files
committed
On async-signal safety.
1 parent 601bf2f commit e4098f4

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

signals.tex

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -386,7 +386,8 @@
386386
\end{minipage}
387387
\begin{itemize}
388388
\item assigns an action \emph{\texttt{act}} for a signal \emph{\texttt{sig}},
389-
previous setting is returned in \emph{\texttt{oact}}, if non-zero
389+
previous setting is returned in \emph{\texttt{*oact}}, if \emph{\texttt{oact}}
390+
is non-zero
390391
\item structure \texttt{sigaction} contains:
391392
\begin{itemize}
392393
ifdef([[[NOSPELLCHECK]]], [[[
@@ -430,8 +431,9 @@
430431
is listed in SUSv4 in section \emph{System Interfaces: General Information
431432
$\Rightarrow$ Signal Concepts $\Rightarrow$ Signal Actions (2.4.3)}. Systems
432433
can extend the list, of course. Whether a function is safe to use in a signal
433-
handler or not should be documented in its manual page. On Linux, see also
434-
the \texttt{signal-safety(7)} manual page.
434+
handler or not should be documented in its manual page. On Linux, see
435+
the \texttt{signal-safety(7)} manual page and also check what it says about
436+
\texttt{printf}.
435437
\item Using static data and/or locking in a function would generally be a
436438
problem for its asynchronous signal safety. It can lead to corrupt data,
437439
deadlocks, etc. As the set of functions safe to use in a handler is limited,

0 commit comments

Comments
 (0)