<!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.11"/> <title>glibmm: Glib::SignalChildWatch Class 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="doxygen.css" rel="stylesheet" type="text/css" /> <link href="doxygen-extra.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 id="projectalign" style="padding-left: 0.5em;"> <div id="projectname">glibmm  <span id="projectnumber">2.60.0</span> </div> </td> </tr> </tbody> </table> </div> <!-- end header part --> <!-- Generated by Doxygen 1.8.11 --> <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><a href="modules.html"><span>Modules</span></a></li> <li><a href="namespaces.html"><span>Namespaces</span></a></li> <li class="current"><a href="annotated.html"><span>Classes</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>Class List</span></a></li> <li><a href="classes.html"><span>Class Index</span></a></li> <li><a href="inherits.html"><span>Class Hierarchy</span></a></li> <li><a href="functions.html"><span>Class Members</span></a></li> </ul> </div> <div id="nav-path" class="navpath"> <ul> <li class="navelem"><a class="el" href="namespaceGlib.html">Glib</a></li><li class="navelem"><a class="el" href="classGlib_1_1SignalChildWatch.html">SignalChildWatch</a></li> </ul> </div> </div><!-- top --> <div class="header"> <div class="summary"> <a href="#pub-methods">Public Member Functions</a> | <a href="classGlib_1_1SignalChildWatch-members.html">List of all members</a> </div> <div class="headertitle"> <div class="title">Glib::SignalChildWatch Class Reference<div class="ingroups"><a class="el" href="group__MainLoop.html">The Main Event Loop</a></div></div> </div> </div><!--header--> <div class="contents"> <p><code>#include <glibmm/main.h></code></p> <table class="memberdecls"> <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a> Public Member Functions</h2></td></tr> <tr class="memitem:a4c2f5be316b9600133129cc974b6b5bb"><td class="memItemLeft" align="right" valign="top"><a class="elRef" href="../../../libsigc++-2.0/reference/html/structsigc_1_1connection.html">sigc::connection</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classGlib_1_1SignalChildWatch.html#a4c2f5be316b9600133129cc974b6b5bb">connect</a> (const <a class="elRef" href="../../../libsigc++-2.0/reference/html/classsigc_1_1slot.html">sigc::slot</a>< void, GPid, int >& slot, GPid pid, int priority=<a class="el" href="namespaceGlib.html#a0c450f82b9e34689e2dda2038ba7834fa597ed3aa6067516c9c752896f3816b5e">PRIORITY_DEFAULT</a>)</td></tr> <tr class="memdesc:a4c2f5be316b9600133129cc974b6b5bb"><td class="mdescLeft"> </td><td class="mdescRight">Connects a child watch handler. <a href="#a4c2f5be316b9600133129cc974b6b5bb">More...</a><br /></td></tr> <tr class="separator:a4c2f5be316b9600133129cc974b6b5bb"><td class="memSeparator" colspan="2"> </td></tr> </table> <h2 class="groupheader">Member Function Documentation</h2> <a class="anchor" id="a4c2f5be316b9600133129cc974b6b5bb"></a> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="elRef" href="../../../libsigc++-2.0/reference/html/structsigc_1_1connection.html">sigc::connection</a> Glib::SignalChildWatch::connect </td> <td>(</td> <td class="paramtype">const <a class="elRef" href="../../../libsigc++-2.0/reference/html/classsigc_1_1slot.html">sigc::slot</a>< void, GPid, int > & </td> <td class="paramname"><em>slot</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">GPid </td> <td class="paramname"><em>pid</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">int </td> <td class="paramname"><em>priority</em> = <code><a class="el" href="namespaceGlib.html#a0c450f82b9e34689e2dda2038ba7834fa597ed3aa6067516c9c752896f3816b5e">PRIORITY_DEFAULT</a></code> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td> </tr> </table> </div><div class="memdoc"> <p>Connects a child watch handler. </p> <div class="fragment"><div class="line"><span class="keywordtype">void</span> child_watch_handler(GPid pid, <span class="keywordtype">int</span> child_status) { ... }</div><div class="line"><a class="code" href="group__MainLoop.html#ga11ee7db80cc44ece02056a38bb049e3b">Glib::signal_child_watch</a>().<a class="code" href="classGlib_1_1SignalChildWatch.html#a4c2f5be316b9600133129cc974b6b5bb">connect</a>(<a class="codeRef" href="../../../libsigc++-2.0/reference/html/group__ptr__fun.html#ga9c80de72f656fb05e81fda622dddc863">sigc::ptr_fun</a>(& child_watch_handler), pid);</div></div><!-- fragment --><p>This method is not thread-safe. You should call it, or manipulate the returned <a class="elRef" href="../../../libsigc++-2.0/reference/html/structsigc_1_1connection.html">sigc::connection</a> object, only from the thread where the <a class="el" href="classGlib_1_1SignalChildWatch.html">SignalChildWatch</a> object's <a class="el" href="classGlib_1_1MainContext.html" title="Main context. ">MainContext</a> runs.</p> <dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">slot</td><td>A slot to call when child process <em>pid</em> exited. </td></tr> <tr><td class="paramname">pid</td><td>The child process to watch for. </td></tr> <tr><td class="paramname">priority</td><td>The priority of the new event source. </td></tr> </table> </dd> </dl> <dl class="section return"><dt>Returns</dt><dd>A connection handle, which can be used to disconnect the handler. </dd></dl> </div> </div> </div><!-- contents --> <!-- start footer part --> <hr class="footer"/><address class="footer"><small> Generated on Tue Mar 19 2019 09:56:46 for glibmm by  <a href="http://www.doxygen.org/index.html"> <img class="footer" src="doxygen.png" alt="doxygen"/> </a> 1.8.11 </small></address> </body> </html>