<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> <meta http-equiv="X-UA-Compatible" content="IE=9"/> <meta name="generator" content="Doxygen 1.8.3"/> <title>PulseAudio: pa_spawn_api Struct Reference</title> <link href="tabs.css" rel="stylesheet" type="text/css"/> <script type="text/javascript" src="jquery.js"></script> <script type="text/javascript" src="dynsections.js"></script> <link href="navtree.css" rel="stylesheet" type="text/css"/> <script type="text/javascript" src="resize.js"></script> <script type="text/javascript" src="navtree.js"></script> <script type="text/javascript"> $(document).ready(initResizable); $(window).load(resizeHeight); </script> <link href="doxygen.css" rel="stylesheet" type="text/css" /> </head> <body> <div id="top"><!-- do not remove this div, it is closed by doxygen! --> <div id="titlearea"> <table cellspacing="0" cellpadding="0"> <tbody> <tr style="height: 56px;"> <td style="padding-left: 0.5em;"> <div id="projectname">PulseAudio  <span id="projectnumber">2.1</span> </div> </td> </tr> </tbody> </table> </div> <!-- end header part --> <!-- Generated by Doxygen 1.8.3 --> <div id="navrow1" class="tabs"> <ul class="tablist"> <li><a href="index.html"><span>Main Page</span></a></li> <li><a href="pages.html"><span>Related Pages</span></a></li> <li class="current"><a href="annotated.html"><span>Data Structures</span></a></li> <li><a href="files.html"><span>Files</span></a></li> <li><a href="examples.html"><span>Examples</span></a></li> </ul> </div> <div id="navrow2" class="tabs2"> <ul class="tablist"> <li><a href="annotated.html"><span>Data Structures</span></a></li> <li><a href="classes.html"><span>Data Structure Index</span></a></li> <li><a href="functions.html"><span>Data Fields</span></a></li> </ul> </div> </div><!-- top --> <div id="side-nav" class="ui-resizable side-nav-resizable"> <div id="nav-tree"> <div id="nav-tree-contents"> <div id="nav-sync" class="sync"></div> </div> </div> <div id="splitbar" style="-moz-user-select:none;" class="ui-resizable-handle"> </div> </div> <script type="text/javascript"> $(document).ready(function(){initNavTree('structpa__spawn__api.html','');}); </script> <div id="doc-content"> <div class="header"> <div class="summary"> <a href="#pub-attribs">Data Fields</a> </div> <div class="headertitle"> <div class="title">pa_spawn_api Struct Reference</div> </div> </div><!--header--> <div class="contents"> <p>A structure for the spawn api. <a href="structpa__spawn__api.html#details">More...</a></p> <table class="memberdecls"> <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-attribs"></a> Data Fields</h2></td></tr> <tr class="memitem:a009dfea821d3d41639fa07d57426a654"><td class="memItemLeft" align="right" valign="top">void(* </td><td class="memItemRight" valign="bottom"><a class="el" href="structpa__spawn__api.html#a009dfea821d3d41639fa07d57426a654">prefork</a> )(void)</td></tr> <tr class="memdesc:a009dfea821d3d41639fa07d57426a654"><td class="mdescLeft"> </td><td class="mdescRight">Is called just before the fork in the parent process. <a href="#a009dfea821d3d41639fa07d57426a654"></a><br/></td></tr> <tr class="separator:a009dfea821d3d41639fa07d57426a654"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a54ede5d359932debf9c8ad6c70157765"><td class="memItemLeft" align="right" valign="top">void(* </td><td class="memItemRight" valign="bottom"><a class="el" href="structpa__spawn__api.html#a54ede5d359932debf9c8ad6c70157765">postfork</a> )(void)</td></tr> <tr class="memdesc:a54ede5d359932debf9c8ad6c70157765"><td class="mdescLeft"> </td><td class="mdescRight">Is called immediately after the fork in the parent process. <a href="#a54ede5d359932debf9c8ad6c70157765"></a><br/></td></tr> <tr class="separator:a54ede5d359932debf9c8ad6c70157765"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a265fe372320341c1b83000bdc5ce7f68"><td class="memItemLeft" align="right" valign="top">void(* </td><td class="memItemRight" valign="bottom"><a class="el" href="structpa__spawn__api.html#a265fe372320341c1b83000bdc5ce7f68">atfork</a> )(void)</td></tr> <tr class="memdesc:a265fe372320341c1b83000bdc5ce7f68"><td class="mdescLeft"> </td><td class="mdescRight">Is called immediately after the fork in the child process. <a href="#a265fe372320341c1b83000bdc5ce7f68"></a><br/></td></tr> <tr class="separator:a265fe372320341c1b83000bdc5ce7f68"><td class="memSeparator" colspan="2"> </td></tr> </table> <a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2> <div class="textblock"><p>A structure for the spawn api. </p> <p>This may be used to integrate auto spawned daemons into your application. For more information see <a class="el" href="context_8h.html#a983ce13d45c5f4b0db8e1a34e21f9fce" title="Connect the context to the specified server.">pa_context_connect()</a>. When spawning a new child process the waitpid() is used on the child's PID. The spawn routine will not block or ignore SIGCHLD signals, since this cannot be done in a thread compatible way. You might have to do this in prefork/postfork. </p> </div><h2 class="groupheader">Field Documentation</h2> <a class="anchor" id="a265fe372320341c1b83000bdc5ce7f68"></a> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void(* pa_spawn_api::atfork)(void)</td> </tr> </table> </div><div class="memdoc"> <p>Is called immediately after the fork in the child process. </p> <p>May be NULL. It is not safe to close all file descriptors in this function unconditionally, since a UNIX socket (created using socketpair()) is passed to the new process. </p> </div> </div> <a class="anchor" id="a54ede5d359932debf9c8ad6c70157765"></a> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void(* pa_spawn_api::postfork)(void)</td> </tr> </table> </div><div class="memdoc"> <p>Is called immediately after the fork in the parent process. </p> <p>May be NULL. </p> </div> </div> <a class="anchor" id="a009dfea821d3d41639fa07d57426a654"></a> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void(* pa_spawn_api::prefork)(void)</td> </tr> </table> </div><div class="memdoc"> <p>Is called just before the fork in the parent process. </p> <p>May be NULL. </p> </div> </div> <hr/>The documentation for this struct was generated from the following file:<ul> <li><a class="el" href="def_8h_source.html">def.h</a></li> </ul> </div><!-- contents --> </div><!-- doc-content --> <!-- start footer part --> <div id="nav-path" class="navpath"><!-- id is needed for treeview function! --> <ul> <li class="navelem"><a class="el" href="structpa__spawn__api.html">pa_spawn_api</a></li> <li class="footer">Generated by <a href="http://www.doxygen.org/index.html"> <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.3 </li> </ul> </div> </body> </html>