<HTML ><HEAD ><TITLE >rwrite</TITLE ><META NAME="GENERATOR" CONTENT="Modular DocBook HTML Stylesheet Version 1.76b+ "><LINK REL="HOME" TITLE="Prelude API Reference Manual" HREF="book1.html"><LINK REL="UP" TITLE="Prelude Core functions" HREF="prelude-core.html"><LINK REL="PREVIOUS" TITLE="async-write" HREF="prelude-async-write.html"><LINK REL="NEXT" TITLE="auth" HREF="prelude-auth.html"></HEAD ><BODY CLASS="REFENTRY" BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#840084" ALINK="#0000FF" ><DIV CLASS="NAVHEADER" ><TABLE WIDTH="100%" BORDER="0" BGCOLOR="#000000" CELLPADDING="1" CELLSPACING="0" ><TR ><TH COLSPAN="4" ALIGN="center" ><FONT COLOR="#FFFFFF" SIZE="5" >Prelude API Reference Manual</FONT ></TH ></TR ><TR ><TD WIDTH="25%" BGCOLOR="#C00000" ALIGN="left" ><A HREF="prelude-async-write.html" ><FONT COLOR="#FFFFFF" SIZE="3" ><B ><<< Previous Page</B ></FONT ></A ></TD ><TD WIDTH="25%" BGCOLOR="#0000C0" ALIGN="center" ><FONT COLOR="#FFFFFF" SIZE="3" ><B ><A HREF="book1.html" ><FONT COLOR="#FFFFFF" SIZE="3" ><B >Home</B ></FONT ></A ></B ></FONT ></TD ><TD WIDTH="25%" BGCOLOR="#00C000" ALIGN="center" ><FONT COLOR="#FFFFFF" SIZE="3" ><B ><A HREF="prelude-core.html" ><FONT COLOR="#FFFFFF" SIZE="3" ><B >Up</B ></FONT ></A ></B ></FONT ></TD ><TD WIDTH="25%" BGCOLOR="#C00000" ALIGN="right" ><A HREF="prelude-auth.html" ><FONT COLOR="#FFFFFF" SIZE="3" ><B >Next Page >>></B ></FONT ></A ></TD ></TR ></TABLE ></DIV ><H1 ><A NAME="PRELUDE-RWRITE">rwrite</H1 ><DIV CLASS="REFNAMEDIV" ><A NAME="AEN892" ></A ><H2 >Name</H2 >rwrite -- </DIV ><DIV CLASS="REFSYNOPSISDIV" ><A NAME="AEN895"><H2 >Synopsis</H2 ><TABLE BORDER="0" BGCOLOR="#D6E8FF" WIDTH="100%" CELLPADDING="6" ><TR ><TD ><PRE CLASS="SYNOPSIS" > void <A HREF="prelude-rwrite.html#RWRITE-INIT" >rwrite_init</A > (int _fd, pid_t _ppid); void <A HREF="prelude-rwrite.html#RWRITE-EXIT" >rwrite_exit</A > (void); int <A HREF="prelude-rwrite.html#RWRITE-WRITE" >rwrite_write</A > (alert_t *alert, int backup_on_error);</PRE ></TD ></TR ></TABLE ></DIV ><DIV CLASS="REFSECT1" ><A NAME="AEN903" ></A ><H2 >Description</H2 ><P ></P ></DIV ><DIV CLASS="REFSECT1" ><A NAME="AEN906" ></A ><H2 >Details</H2 ><DIV CLASS="REFSECT2" ><A NAME="AEN908" ></A ><H3 ><A NAME="RWRITE-INIT" ></A >rwrite_init ()</H3 ><TABLE BORDER="0" BGCOLOR="#D6E8FF" WIDTH="100%" CELLPADDING="6" ><TR ><TD ><PRE CLASS="PROGRAMLISTING" >void rwrite_init (int _fd, pid_t _ppid);</PRE ></TD ></TR ></TABLE ><P >Initialize the rwrite module.</P ><P ></P ><DIV CLASS="INFORMALTABLE" ><A NAME="AEN915"><P ></P ><TABLE BORDER="0" WIDTH="100%" BGCOLOR="#FFD0D0" CELLSPACING="0" CELLPADDING="4" CLASS="CALSTABLE" ><TBODY ><TR ><TD WIDTH="20%" ALIGN="RIGHT" VALIGN="TOP" ><TT CLASS="PARAMETER" ><I >_fd</I ></TT > :</TD ><TD WIDTH="80%" ALIGN="LEFT" VALIGN="TOP" > A file descriptor to be used.</TD ></TR ><TR ><TD WIDTH="20%" ALIGN="RIGHT" VALIGN="TOP" ><TT CLASS="PARAMETER" ><I >_ppid</I ></TT > :</TD ><TD WIDTH="80%" ALIGN="LEFT" VALIGN="TOP" > The PID of the process where notification should be sent.</TD ></TR ></TBODY ></TABLE ><P ></P ></DIV ></DIV ><HR><DIV CLASS="REFSECT2" ><A NAME="AEN928" ></A ><H3 ><A NAME="RWRITE-EXIT" ></A >rwrite_exit ()</H3 ><TABLE BORDER="0" BGCOLOR="#D6E8FF" WIDTH="100%" CELLPADDING="6" ><TR ><TD ><PRE CLASS="PROGRAMLISTING" >void rwrite_exit (void);</PRE ></TD ></TR ></TABLE ><P >Uninitialize the rwrite module. Further call to the <A HREF="prelude-rwrite.html#RWRITE-WRITE" >rwrite_write</A >() function will result the data being backuped.</P ><P ></P ></DIV ><HR><DIV CLASS="REFSECT2" ><A NAME="AEN935" ></A ><H3 ><A NAME="RWRITE-WRITE" ></A >rwrite_write ()</H3 ><TABLE BORDER="0" BGCOLOR="#D6E8FF" WIDTH="100%" CELLPADDING="6" ><TR ><TD ><PRE CLASS="PROGRAMLISTING" >int rwrite_write (alert_t *alert, int backup_on_error);</PRE ></TD ></TR ></TABLE ><P >This function try to write a report to the file descriptor passed to the <A HREF="prelude-rwrite.html#RWRITE-INIT" >rwrite_init</A >() function.</P ><P >In case of error, the process specified in the <A HREF="prelude-rwrite.html#RWRITE-INIT" >rwrite_init</A >() call, is notified by a SIGPIPE, telling it that the connection with the Report Server was eventually closed.</P ><P >In case <A HREF="prelude-rwrite.html#RWRITE-EXIT" >rwrite_exit</A >() was called or if an error occur, and if the backup_on_error flag is set to TRUE, the report is backuped.</P ><P ></P ><DIV CLASS="INFORMALTABLE" ><A NAME="AEN947"><P ></P ><TABLE BORDER="0" WIDTH="100%" BGCOLOR="#FFD0D0" CELLSPACING="0" CELLPADDING="4" CLASS="CALSTABLE" ><TBODY ><TR ><TD WIDTH="20%" ALIGN="RIGHT" VALIGN="TOP" ><TT CLASS="PARAMETER" ><I >alert</I ></TT > :</TD ><TD WIDTH="80%" ALIGN="LEFT" VALIGN="TOP" > The report to send.</TD ></TR ><TR ><TD WIDTH="20%" ALIGN="RIGHT" VALIGN="TOP" ><TT CLASS="PARAMETER" ><I >backup_on_error</I ></TT > :</TD ><TD WIDTH="80%" ALIGN="LEFT" VALIGN="TOP" > A flag specifying if data should be backuped on error.</TD ></TR ><TR ><TD WIDTH="20%" ALIGN="RIGHT" VALIGN="TOP" ><SPAN CLASS="emphasis" ><I CLASS="EMPHASIS" >Returns</I ></SPAN > :</TD ><TD WIDTH="80%" ALIGN="LEFT" VALIGN="TOP" > 0 on success, -1 otherwise.</TD ></TR ></TBODY ></TABLE ><P ></P ></DIV ></DIV ></DIV ><DIV CLASS="NAVFOOTER" ><BR CLEAR="all"><BR><TABLE WIDTH="100%" BORDER="0" BGCOLOR="#000000" CELLPADDING="1" CELLSPACING="0" ><TR ><TD WIDTH="25%" BGCOLOR="#C00000" ALIGN="left" ><A HREF="prelude-async-write.html" ><FONT COLOR="#FFFFFF" SIZE="3" ><B ><<< Previous Page</B ></FONT ></A ></TD ><TD WIDTH="25%" BGCOLOR="#0000C0" ALIGN="center" ><FONT COLOR="#FFFFFF" SIZE="3" ><B ><A HREF="book1.html" ><FONT COLOR="#FFFFFF" SIZE="3" ><B >Home</B ></FONT ></A ></B ></FONT ></TD ><TD WIDTH="25%" BGCOLOR="#00C000" ALIGN="center" ><FONT COLOR="#FFFFFF" SIZE="3" ><B ><A HREF="prelude-core.html" ><FONT COLOR="#FFFFFF" SIZE="3" ><B >Up</B ></FONT ></A ></B ></FONT ></TD ><TD WIDTH="25%" BGCOLOR="#C00000" ALIGN="right" ><A HREF="prelude-auth.html" ><FONT COLOR="#FFFFFF" SIZE="3" ><B >Next Page >>></B ></FONT ></A ></TD ></TR ><TR ><TD COLSPAN="2" ALIGN="left" ><FONT COLOR="#FFFFFF" SIZE="3" ><B >async-write</B ></FONT ></TD ><TD COLSPAN="2" ALIGN="right" ><FONT COLOR="#FFFFFF" SIZE="3" ><B >auth</B ></FONT ></TD ></TR ></TABLE ></DIV ></BODY ></HTML >