\hypertarget{iof__orted_8h}{\section{orte/mca/iof/orted/iof\+\_\+orted.h File Reference}
\label{iof__orted_8h}\index{orte/mca/iof/orted/iof\+\_\+orted.\+h@{orte/mca/iof/orted/iof\+\_\+orted.\+h}}
}


The orted I\+O\+F component is used in daemons.  


{\ttfamily \#include \char`\"{}orte\+\_\+config.\+h\char`\"{}}\\*
{\ttfamily \#include \char`\"{}opal/class/opal\+\_\+list.\+h\char`\"{}}\\*
{\ttfamily \#include \char`\"{}orte/mca/rml/rml\+\_\+types.\+h\char`\"{}}\\*
{\ttfamily \#include \char`\"{}orte/mca/iof/iof.\+h\char`\"{}}\\*
\subsection*{Data Structures}
\begin{DoxyCompactItemize}
\item 
struct \hyperlink{structorte__iof__orted__component__t}{orte\+\_\+iof\+\_\+orted\+\_\+component\+\_\+t}
\begin{DoxyCompactList}\small\item\em I\+O\+F O\+R\+T\+E\+D Component. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Typedefs}
\begin{DoxyCompactItemize}
\item 
\hypertarget{iof__orted_8h_a42e02e7315d3b6592785a621ac6bad56}{typedef struct \\*
\hyperlink{structorte__iof__orted__component__t}{orte\+\_\+iof\+\_\+orted\+\_\+component\+\_\+t} {\bfseries orte\+\_\+iof\+\_\+orted\+\_\+component\+\_\+t}}\label{iof__orted_8h_a42e02e7315d3b6592785a621ac6bad56}

\end{DoxyCompactItemize}
\subsection*{Functions}
\begin{DoxyCompactItemize}
\item 
\hypertarget{iof__orted_8h_a79beea40275969867dbe9098afd2b6ea}{void {\bfseries orte\+\_\+iof\+\_\+orted\+\_\+recv} (int status, \hyperlink{structorte__process__name__t}{orte\+\_\+process\+\_\+name\+\_\+t} $\ast$sender, \hyperlink{structopal__buffer__t}{opal\+\_\+buffer\+\_\+t} $\ast$buffer, \hyperlink{rml__types_8h_ab0683f653b0908cf6520469d91559917}{orte\+\_\+rml\+\_\+tag\+\_\+t} tag, void $\ast$cbdata)}\label{iof__orted_8h_a79beea40275969867dbe9098afd2b6ea}

\item 
\hypertarget{iof__orted_8h_ab855a9a236231c69defc07953c2f9ef2}{void {\bfseries orte\+\_\+iof\+\_\+orted\+\_\+read\+\_\+handler} (int fd, short \hyperlink{structevent}{event}, void $\ast$data)}\label{iof__orted_8h_ab855a9a236231c69defc07953c2f9ef2}

\item 
\hypertarget{iof__orted_8h_a5210a5f2a9392f715a30dc2b2d36f832}{void {\bfseries orte\+\_\+iof\+\_\+orted\+\_\+send\+\_\+xonxoff} (orte\+\_\+iof\+\_\+tag\+\_\+t tag)}\label{iof__orted_8h_a5210a5f2a9392f715a30dc2b2d36f832}

\end{DoxyCompactItemize}
\subsection*{Variables}
\begin{DoxyCompactItemize}
\item 
\hypertarget{iof__orted_8h_a04c605482a5dbf54f010a72b63638059}{O\+R\+T\+E\+\_\+\+M\+O\+D\+U\+L\+E\+\_\+\+D\+E\+C\+L\+S\+P\+E\+C \\*
\hyperlink{structorte__iof__orted__component__t}{orte\+\_\+iof\+\_\+orted\+\_\+component\+\_\+t} {\bfseries mca\+\_\+iof\+\_\+orted\+\_\+component}}\label{iof__orted_8h_a04c605482a5dbf54f010a72b63638059}

\item 
\hypertarget{iof__orted_8h_a2e77c3bc3c47cb93772eb2e12ea0d033}{\hyperlink{structorte__iof__base__module__2__0__0__t}{orte\+\_\+iof\+\_\+base\+\_\+module\+\_\+t} {\bfseries orte\+\_\+iof\+\_\+orted\+\_\+module}}\label{iof__orted_8h_a2e77c3bc3c47cb93772eb2e12ea0d033}

\end{DoxyCompactItemize}


\subsection{Detailed Description}
The orted I\+O\+F component is used in daemons. 

It is used to orted all I\+O\+F actions back to the \char`\"{}hnp\char`\"{} I\+O\+F component (i.\+e., the I\+O\+F component that runs in the H\+N\+P). The orted I\+O\+F component is loaded in an orted and then tied to the stdin, stdout, and stderr streams of created child processes via pipes. The orted I\+O\+F component in the orted then acts as the relay between the stdin/stdout/stderr pipes and the I\+O\+F component in the H\+N\+P. This design allows us to manipulate stdin/stdout/stderr from before main() in the child process.

Much of the intelligence of this component is actually contained in iof\+\_\+base\+\_\+endpoint.\+c (reading and writing to local file descriptors, setting up events based on file descriptors, etc.).

A non-\/blocking O\+O\+B receive is posted at the initialization of this component to receive all messages from the H\+N\+P (e.\+g., data fragments from streams, A\+C\+Ks to fragments).

Flow control is employed on a per-\/stream basis to ensure that S\+O\+U\+R\+C\+Es don't overwhelm S\+I\+N\+K resources (E.\+g., send an entire input file to an orted before the target process has read any of it). 