\hypertarget{group__signalfd}{
\section{signalfd: Pass signals along a file.}
\label{group__signalfd}\index{signalfd: Pass signals along a file.@{signalfd: Pass signals along a file.}}
}
\subsection*{Functions}
\begin{CompactItemize}
\item 
int \hyperlink{group__signalfd_g059bff6a5a276e3add55103147dc1a46}{signalfd\_\-init} (void)
\item 
void \hyperlink{group__signalfd_gd0c7324a233f709ca5c68ab88baa696d}{signalfd\_\-catch} (int sig)
\item 
void \hyperlink{group__signalfd_g158526355d92fca1cb9d116f0468a871}{signalfd\_\-uncatch} (int sig)
\item 
void \hyperlink{group__signalfd_g9f1de42e4d96723e5cd23740946291ba}{signalfd\_\-close} (void)
\end{CompactItemize}


\subsection{Function Documentation}
\hypertarget{group__signalfd_gd0c7324a233f709ca5c68ab88baa696d}{
\index{signalfd@{signalfd}!signalfd\_\-catch@{signalfd\_\-catch}}
\index{signalfd\_\-catch@{signalfd\_\-catch}!signalfd@{signalfd}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void signalfd\_\-catch (int {\em sig})}}
\label{group__signalfd_gd0c7324a233f709ca5c68ab88baa696d}


Mark a signal as being caught through the signalfd interface. \hypertarget{group__signalfd_g9f1de42e4d96723e5cd23740946291ba}{
\index{signalfd@{signalfd}!signalfd\_\-close@{signalfd\_\-close}}
\index{signalfd\_\-close@{signalfd\_\-close}!signalfd@{signalfd}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void signalfd\_\-close (void)}}
\label{group__signalfd_g9f1de42e4d96723e5cd23740946291ba}


Close the signalfd interface. \hypertarget{group__signalfd_g059bff6a5a276e3add55103147dc1a46}{
\index{signalfd@{signalfd}!signalfd\_\-init@{signalfd\_\-init}}
\index{signalfd\_\-init@{signalfd\_\-init}!signalfd@{signalfd}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int signalfd\_\-init (void)}}
\label{group__signalfd_g059bff6a5a276e3add55103147dc1a46}


Initialize the signal file descriptor.

This function creates a pipe through which signals will get passed. This is a way of handling signals that avoids most problems posed by UNIX signals. When a signal is caught by this interface, the numerical value of the signal is passed down the pipe as a native integer. The file descriptor is set to non-blocking mode to prevent blocking when reading from it.

To use the file descriptor, use either {\tt poll} or {\tt select} to determine when it is readable. When it becomes readable, read a single byte from it. The value of this byte indicates what signal was caught.

Due to the global nature of UNIX signal handling, only a single signalfd interface may be active at any time. Do not call {\tt signalfd\_\-init} multiple times without calling {\tt signalfd\_\-close} first.

\begin{Desc}
\item[Returns:]-1 if an error occurred, otherwise the return value is the file descriptor opened for reading. \end{Desc}
\hypertarget{group__signalfd_g158526355d92fca1cb9d116f0468a871}{
\index{signalfd@{signalfd}!signalfd\_\-uncatch@{signalfd\_\-uncatch}}
\index{signalfd\_\-uncatch@{signalfd\_\-uncatch}!signalfd@{signalfd}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void signalfd\_\-uncatch (int {\em sig})}}
\label{group__signalfd_g158526355d92fca1cb9d116f0468a871}


Unmark a signal as being caught through the signalfd interface. 