<html> <head> <title>Ecore: Process Spawning Functions</title> <meta http-equiv="content-type" content="text/html;charset=UTF-8"> <meta name="author" content="Andres Blanc" > <link rel="icon" href="img/favicon.png" type="image/x-icon"> <link rel="shortcut icon" href="img/favicon.png" type="image/x-icon"> <link rel="icon" href="img/favicon.png" type="image/ico"> <link rel="shortcut icon" href="img/favicon.png" type="image/ico"> <link rel="stylesheet" type="text/css" href="e.css"> <link rel="stylesheet" type="text/css" href="edoxy.css"> </head> <body> <div id="container"> <div id="header"> <div class="layout"> <h1><span>Enlightenment</span></h1> <h2><span>Beauty at your fingertips</span></h2> <table cellspacing="0" cellpadding="0" width="100%"><tr> <td id="header_logo"> <a href="http://www.enlightenment.org"></a> </td> <td id="header_menu"> <table cellspacing="0" cellpadding="0" align="right"><tr> <td class="nav_passive"><a class="nav_passive" href="http://www.enlightenment.org/p.php?p=home">Home</a></td> <td class="nav_passive"><a class="nav_passive" href="http://www.enlightenment.org/p.php?p=news">News</a></td> <td class="nav_passive"><a class="nav_passive" href="http://www.enlightenment.org/p.php?p=about">About</a></td> <td class="nav_passive"><a class="nav_passive" href="http://www.enlightenment.org/p.php?p=download">Download</a></td> <td class="nav_passive"><a class="nav_passive" href="http://www.enlightenment.org/p.php?p=support">Support</a></td> <td class="nav_passive"><a class="nav_passive" href="http://www.enlightenment.org/p.php?p=contribute">Contribute</a></td> <td class="nav_passive"><a class="nav_passive" href="http://www.enlightenment.org/p.php?p=contact">Contact</a></td> <td class="nav_passive"><a class="nav_passive" href="http://trac.enlightenment.org/e">Tracker</a></td> <td class="nav_passive"><a class="nav_passive" href="http://www.enlightenment.org/p.php?p=docs">Docs</a></td> </tr></table> </td> <td id="header_last"></td> </tr></table> <div class="doxytitle"> Ecore Documentation <small>at 2 Jul 2010</small> </div> <div class="menu-container"> <div class="submenu"> <ul class="current"> <li><a href="files.html">Files</a></li> <li><a href="annotated.html">Data Structures</a></li> <li><a href="globals.html">Globals</a></li> <li><a href="modules.html">Modules</a></li> <li><a href="pages.html">Related Pages</a></li> <li class="current"><a href="index.html">Main Page</a></li> </ul> </div> </div> <div class="clear"></div> </div> </div> <div id="content"> <div class="layout"> <!-- Generated by Doxygen 1.6.2-20100208 --> <div class="contents"> <h1>Process Spawning Functions</h1> <p>Functions that deal with spawned processes. <a href="#_details">More...</a></p> <table border="0" cellpadding="0" cellspacing="0"> <tr><td colspan="2"><h2>Functions</h2></td></tr> <tr><td class="memItemLeft" align="right" valign="top">EAPI void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__Ecore__Exe__Basic__Group.html#ga52c4ee99d493595fef39026dd2402704">ecore_exe_run_priority_set</a> (int pri)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Sets the priority at which to launch processes. <a href="#ga52c4ee99d493595fef39026dd2402704"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">EAPI int </td><td class="memItemRight" valign="bottom"><a class="el" href="group__Ecore__Exe__Basic__Group.html#ga572bed12ff3418b8c9f9f0c94793c12c">ecore_exe_run_priority_get</a> (void)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Gets the priority at which to launch processes. <a href="#ga572bed12ff3418b8c9f9f0c94793c12c"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">EAPI <a class="el" href="Ecore_8h.html#a16f4610064ba77bb0e3ff20485a6362a">Ecore_Exe</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="group__Ecore__Exe__Basic__Group.html#ga7ee5b2a9c3b1458395ff60287d368faa">ecore_exe_run</a> (const char *exe_cmd, const void *data)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Spawns a child process. <a href="#ga7ee5b2a9c3b1458395ff60287d368faa"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">EAPI <a class="el" href="Ecore_8h.html#a16f4610064ba77bb0e3ff20485a6362a">Ecore_Exe</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="group__Ecore__Exe__Basic__Group.html#ga769740ce38413683fb40ddf725ac54b7">ecore_exe_pipe_run</a> (const char *exe_cmd, Ecore_Exe_Flags flags, const void *data)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Spawns a child process with its stdin/out available for communication. <a href="#ga769740ce38413683fb40ddf725ac54b7"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">EAPI Eina_Bool </td><td class="memItemRight" valign="bottom"><a class="el" href="group__Ecore__Exe__Basic__Group.html#ga52206a534dd6170bb609481093357047">ecore_exe_send</a> (<a class="el" href="Ecore_8h.html#a16f4610064ba77bb0e3ff20485a6362a">Ecore_Exe</a> *exe, const void *data, int size)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Sends data to the given child process which it recieves on stdin. <a href="#ga52206a534dd6170bb609481093357047"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">EAPI void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__Ecore__Exe__Basic__Group.html#gaf5b870a7a134744ecbe9accb57bb8730">ecore_exe_close_stdin</a> (<a class="el" href="Ecore_8h.html#a16f4610064ba77bb0e3ff20485a6362a">Ecore_Exe</a> *exe)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">The stdin of the given child process will close when the write buffer is empty. <a href="#gaf5b870a7a134744ecbe9accb57bb8730"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">EAPI void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__Ecore__Exe__Basic__Group.html#ga2ab04470c77bedbaad1ff8e23277e375">ecore_exe_auto_limits_set</a> (<a class="el" href="Ecore_8h.html#a16f4610064ba77bb0e3ff20485a6362a">Ecore_Exe</a> *exe, int start_bytes, int end_bytes, int start_lines, int end_lines)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Sets the auto pipe limits for the given process handle. <a href="#ga2ab04470c77bedbaad1ff8e23277e375"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">EAPI <a class="el" href="struct__Ecore__Exe__Event__Data.html">Ecore_Exe_Event_Data</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="group__Ecore__Exe__Basic__Group.html#gace51fedd2709f26c6c82cd0135aa6dbe">ecore_exe_event_data_get</a> (<a class="el" href="Ecore_8h.html#a16f4610064ba77bb0e3ff20485a6362a">Ecore_Exe</a> *exe, Ecore_Exe_Flags flags)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Gets the auto pipe data for the given process handle. <a href="#gace51fedd2709f26c6c82cd0135aa6dbe"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">EAPI void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__Ecore__Exe__Basic__Group.html#ga68245a929e914cbe4fb64c287ef3f5ae">ecore_exe_tag_set</a> (<a class="el" href="Ecore_8h.html#a16f4610064ba77bb0e3ff20485a6362a">Ecore_Exe</a> *exe, const char *tag)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Sets the string tag for the given process handle. <a href="#ga68245a929e914cbe4fb64c287ef3f5ae"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">EAPI const char * </td><td class="memItemRight" valign="bottom"><a class="el" href="group__Ecore__Exe__Basic__Group.html#ga14e23f1d003d3bdd2431176cec009857">ecore_exe_tag_get</a> (const <a class="el" href="Ecore_8h.html#a16f4610064ba77bb0e3ff20485a6362a">Ecore_Exe</a> *exe)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Retrieves the tag attached to the given process handle. <a href="#ga14e23f1d003d3bdd2431176cec009857"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">EAPI void * </td><td class="memItemRight" valign="bottom"><a class="el" href="group__Ecore__Exe__Basic__Group.html#ga07ef2b7bd313988a0d1691d7e3edcddb">ecore_exe_free</a> (<a class="el" href="Ecore_8h.html#a16f4610064ba77bb0e3ff20485a6362a">Ecore_Exe</a> *exe)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Frees the given process handle. <a href="#ga07ef2b7bd313988a0d1691d7e3edcddb"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">EAPI void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__Ecore__Exe__Basic__Group.html#ga5a0737cb4881d4c4374697335e62336b">ecore_exe_event_data_free</a> (<a class="el" href="struct__Ecore__Exe__Event__Data.html">Ecore_Exe_Event_Data</a> *e)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Frees the given event data. <a href="#ga5a0737cb4881d4c4374697335e62336b"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">EAPI pid_t </td><td class="memItemRight" valign="bottom"><a class="el" href="group__Ecore__Exe__Basic__Group.html#ga6c9cdac282d5a086a54fdee74ebebdbc">ecore_exe_pid_get</a> (const <a class="el" href="Ecore_8h.html#a16f4610064ba77bb0e3ff20485a6362a">Ecore_Exe</a> *exe)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Retrieves the process ID of the given spawned process. <a href="#ga6c9cdac282d5a086a54fdee74ebebdbc"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">EAPI const char * </td><td class="memItemRight" valign="bottom"><a class="el" href="group__Ecore__Exe__Basic__Group.html#ga77906a4fdf7b47c66cddb534f776d011">ecore_exe_cmd_get</a> (const <a class="el" href="Ecore_8h.html#a16f4610064ba77bb0e3ff20485a6362a">Ecore_Exe</a> *exe)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Retrieves the command of the given spawned process. <a href="#ga77906a4fdf7b47c66cddb534f776d011"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">EAPI void * </td><td class="memItemRight" valign="bottom"><a class="el" href="group__Ecore__Exe__Basic__Group.html#ga9ec7a0d09ee02a3e0afefb894ef1fd11">ecore_exe_data_get</a> (const <a class="el" href="Ecore_8h.html#a16f4610064ba77bb0e3ff20485a6362a">Ecore_Exe</a> *exe)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Retrieves the data attached to the given process handle. <a href="#ga9ec7a0d09ee02a3e0afefb894ef1fd11"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">EAPI Ecore_Exe_Flags </td><td class="memItemRight" valign="bottom"><a class="el" href="group__Ecore__Exe__Basic__Group.html#ga743a4f75c4cde2a8f2ec798cd1ce3a91">ecore_exe_flags_get</a> (const <a class="el" href="Ecore_8h.html#a16f4610064ba77bb0e3ff20485a6362a">Ecore_Exe</a> *exe)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Retrieves the flags attached to the given process handle. <a href="#ga743a4f75c4cde2a8f2ec798cd1ce3a91"></a><br/></td></tr> </table> <hr/><a name="_details"></a><h2>Detailed Description</h2> <p>Functions that deal with spawned processes. </p> <hr/><h2>Function Documentation</h2> <a class="anchor" id="ga2ab04470c77bedbaad1ff8e23277e375"></a><!-- doxytag: member="ecore_exe.c::ecore_exe_auto_limits_set" ref="ga2ab04470c77bedbaad1ff8e23277e375" args="(Ecore_Exe *exe, int start_bytes, int end_bytes, int start_lines, int end_lines)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">EAPI void ecore_exe_auto_limits_set </td> <td>(</td> <td class="paramtype"><a class="el" href="Ecore_8h.html#a16f4610064ba77bb0e3ff20485a6362a">Ecore_Exe</a> * </td> <td class="paramname"> <em>exe</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">int </td> <td class="paramname"> <em>start_bytes</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">int </td> <td class="paramname"> <em>end_bytes</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">int </td> <td class="paramname"> <em>start_lines</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">int </td> <td class="paramname"> <em>end_lines</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td></td> </tr> </table> </div> <div class="memdoc"> <p>Sets the auto pipe limits for the given process handle. </p> <p>On Windows this function does nothing.</p> <dl><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>exe</em> </td><td>The given process handle. </td></tr> <tr><td valign="top"></td><td valign="top"><em>start_bytes</em> </td><td>limit of bytes at start of output to buffer. </td></tr> <tr><td valign="top"></td><td valign="top"><em>end_bytes</em> </td><td>limit of bytes at end of output to buffer. </td></tr> <tr><td valign="top"></td><td valign="top"><em>start_lines</em> </td><td>limit of lines at start of output to buffer. </td></tr> <tr><td valign="top"></td><td valign="top"><em>end_lines</em> </td><td>limit of lines at end of output to buffer. </td></tr> </table> </dd> </dl> </div> </div> <a class="anchor" id="gaf5b870a7a134744ecbe9accb57bb8730"></a><!-- doxytag: member="ecore_exe.c::ecore_exe_close_stdin" ref="gaf5b870a7a134744ecbe9accb57bb8730" args="(Ecore_Exe *exe)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">EAPI void ecore_exe_close_stdin </td> <td>(</td> <td class="paramtype"><a class="el" href="Ecore_8h.html#a16f4610064ba77bb0e3ff20485a6362a">Ecore_Exe</a> * </td> <td class="paramname"> <em>exe</em></td> <td> ) </td> <td></td> </tr> </table> </div> <div class="memdoc"> <p>The stdin of the given child process will close when the write buffer is empty. </p> <dl><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>exe</em> </td><td>The child process </td></tr> </table> </dd> </dl> </div> </div> <a class="anchor" id="ga77906a4fdf7b47c66cddb534f776d011"></a><!-- doxytag: member="ecore_exe.c::ecore_exe_cmd_get" ref="ga77906a4fdf7b47c66cddb534f776d011" args="(const Ecore_Exe *exe)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">EAPI const char* ecore_exe_cmd_get </td> <td>(</td> <td class="paramtype">const <a class="el" href="Ecore_8h.html#a16f4610064ba77bb0e3ff20485a6362a">Ecore_Exe</a> * </td> <td class="paramname"> <em>exe</em></td> <td> ) </td> <td></td> </tr> </table> </div> <div class="memdoc"> <p>Retrieves the command of the given spawned process. </p> <dl><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>exe</em> </td><td>Handle to the given spawned process. </td></tr> </table> </dd> </dl> <dl class="return"><dt><b>Returns:</b></dt><dd>The command on success. NULL otherwise. This string is the pointer to the internal value and must not be modified in any way. </dd></dl> </div> </div> <a class="anchor" id="ga9ec7a0d09ee02a3e0afefb894ef1fd11"></a><!-- doxytag: member="ecore_exe.c::ecore_exe_data_get" ref="ga9ec7a0d09ee02a3e0afefb894ef1fd11" args="(const Ecore_Exe *exe)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">EAPI void* ecore_exe_data_get </td> <td>(</td> <td class="paramtype">const <a class="el" href="Ecore_8h.html#a16f4610064ba77bb0e3ff20485a6362a">Ecore_Exe</a> * </td> <td class="paramname"> <em>exe</em></td> <td> ) </td> <td></td> </tr> </table> </div> <div class="memdoc"> <p>Retrieves the data attached to the given process handle. </p> <dl><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>exe</em> </td><td>The given process handle. </td></tr> </table> </dd> </dl> <dl class="return"><dt><b>Returns:</b></dt><dd>The data pointer attached to <code>exe</code> Given to <a class="el" href="group__Ecore__Exe__Basic__Group.html#ga7ee5b2a9c3b1458395ff60287d368faa" title="Spawns a child process.">ecore_exe_run()</a> or <a class="el" href="group__Ecore__Exe__Basic__Group.html#ga769740ce38413683fb40ddf725ac54b7" title="Spawns a child process with its stdin/out available for communication.">ecore_exe_pipe_run()</a> </dd></dl> </div> </div> <a class="anchor" id="ga5a0737cb4881d4c4374697335e62336b"></a><!-- doxytag: member="ecore_exe.c::ecore_exe_event_data_free" ref="ga5a0737cb4881d4c4374697335e62336b" args="(Ecore_Exe_Event_Data *e)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">EAPI void ecore_exe_event_data_free </td> <td>(</td> <td class="paramtype"><a class="el" href="struct__Ecore__Exe__Event__Data.html">Ecore_Exe_Event_Data</a> * </td> <td class="paramname"> <em>e</em></td> <td> ) </td> <td></td> </tr> </table> </div> <div class="memdoc"> <p>Frees the given event data. </p> <dl><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>e</em> </td><td>The given event data. </td></tr> </table> </dd> </dl> <p>References <a class="el" href="Ecore_8h_source.html#l00251">_Ecore_Exe_Event_Data::data</a>, and <a class="el" href="Ecore_8h_source.html#l00253">_Ecore_Exe_Event_Data::lines</a>.</p> </div> </div> <a class="anchor" id="gace51fedd2709f26c6c82cd0135aa6dbe"></a><!-- doxytag: member="ecore_exe.c::ecore_exe_event_data_get" ref="gace51fedd2709f26c6c82cd0135aa6dbe" args="(Ecore_Exe *exe, Ecore_Exe_Flags flags)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">EAPI <a class="el" href="struct__Ecore__Exe__Event__Data.html">Ecore_Exe_Event_Data</a>* ecore_exe_event_data_get </td> <td>(</td> <td class="paramtype"><a class="el" href="Ecore_8h.html#a16f4610064ba77bb0e3ff20485a6362a">Ecore_Exe</a> * </td> <td class="paramname"> <em>exe</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">Ecore_Exe_Flags </td> <td class="paramname"> <em>flags</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td></td> </tr> </table> </div> <div class="memdoc"> <p>Gets the auto pipe data for the given process handle. </p> <dl><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>exe</em> </td><td>The given process handle. </td></tr> <tr><td valign="top"></td><td valign="top"><em>flags</em> </td><td>Is this a ECORE_EXE_PIPE_READ or ECORE_EXE_PIPE_ERROR? </td></tr> </table> </dd> </dl> <p>References <a class="el" href="Ecore_8h_source.html#l00251">_Ecore_Exe_Event_Data::data</a>, <a class="el" href="Ecore_8h_source.html#l00120">ECORE_EXE_PIPE_ERROR</a>, <a class="el" href="Ecore_8h_source.html#l00122">ECORE_EXE_PIPE_ERROR_LINE_BUFFERED</a>, <a class="el" href="Ecore_8h_source.html#l00118">ECORE_EXE_PIPE_READ</a>, <a class="el" href="Ecore_8h_source.html#l00121">ECORE_EXE_PIPE_READ_LINE_BUFFERED</a>, <a class="el" href="Ecore_8h_source.html#l00250">_Ecore_Exe_Event_Data::exe</a>, <a class="el" href="Ecore_8h_source.html#l00253">_Ecore_Exe_Event_Data::lines</a>, and <a class="el" href="Ecore_8h_source.html#l00252">_Ecore_Exe_Event_Data::size</a>.</p> </div> </div> <a class="anchor" id="ga743a4f75c4cde2a8f2ec798cd1ce3a91"></a><!-- doxytag: member="ecore_exe.c::ecore_exe_flags_get" ref="ga743a4f75c4cde2a8f2ec798cd1ce3a91" args="(const Ecore_Exe *exe)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">EAPI Ecore_Exe_Flags ecore_exe_flags_get </td> <td>(</td> <td class="paramtype">const <a class="el" href="Ecore_8h.html#a16f4610064ba77bb0e3ff20485a6362a">Ecore_Exe</a> * </td> <td class="paramname"> <em>exe</em></td> <td> ) </td> <td></td> </tr> </table> </div> <div class="memdoc"> <p>Retrieves the flags attached to the given process handle. </p> <dl><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>exe</em> </td><td>The given process handle. </td></tr> </table> </dd> </dl> <dl class="return"><dt><b>Returns:</b></dt><dd>The flags attached to <code>exe</code>. </dd></dl> </div> </div> <a class="anchor" id="ga07ef2b7bd313988a0d1691d7e3edcddb"></a><!-- doxytag: member="ecore_exe.c::ecore_exe_free" ref="ga07ef2b7bd313988a0d1691d7e3edcddb" args="(Ecore_Exe *exe)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">EAPI void* ecore_exe_free </td> <td>(</td> <td class="paramtype"><a class="el" href="Ecore_8h.html#a16f4610064ba77bb0e3ff20485a6362a">Ecore_Exe</a> * </td> <td class="paramname"> <em>exe</em></td> <td> ) </td> <td></td> </tr> </table> </div> <div class="memdoc"> <p>Frees the given process handle. </p> <p>Note that the process that the handle represents is unaffected by this function.</p> <dl><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>exe</em> </td><td>The given process handle. </td></tr> </table> </dd> </dl> <dl class="return"><dt><b>Returns:</b></dt><dd>The data attached to the handle when <a class="el" href="group__Ecore__Exe__Basic__Group.html#ga7ee5b2a9c3b1458395ff60287d368faa">ecore_exe_run</a> was called. </dd></dl> <p>References <a class="el" href="ecore__main_8c_source.html#l00319">ecore_main_fd_handler_del()</a>, and <a class="el" href="ecore__timer_8c_source.html#l00171">ecore_timer_del()</a>.</p> </div> </div> <a class="anchor" id="ga6c9cdac282d5a086a54fdee74ebebdbc"></a><!-- doxytag: member="ecore_exe.c::ecore_exe_pid_get" ref="ga6c9cdac282d5a086a54fdee74ebebdbc" args="(const Ecore_Exe *exe)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">EAPI pid_t ecore_exe_pid_get </td> <td>(</td> <td class="paramtype">const <a class="el" href="Ecore_8h.html#a16f4610064ba77bb0e3ff20485a6362a">Ecore_Exe</a> * </td> <td class="paramname"> <em>exe</em></td> <td> ) </td> <td></td> </tr> </table> </div> <div class="memdoc"> <p>Retrieves the process ID of the given spawned process. </p> <dl><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>exe</em> </td><td>Handle to the given spawned process. </td></tr> </table> </dd> </dl> <dl class="return"><dt><b>Returns:</b></dt><dd>The process ID on success. <code>-1</code> otherwise. </dd></dl> </div> </div> <a class="anchor" id="ga769740ce38413683fb40ddf725ac54b7"></a><!-- doxytag: member="ecore_exe.c::ecore_exe_pipe_run" ref="ga769740ce38413683fb40ddf725ac54b7" args="(const char *exe_cmd, Ecore_Exe_Flags flags, const void *data)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">EAPI <a class="el" href="Ecore_8h.html#a16f4610064ba77bb0e3ff20485a6362a">Ecore_Exe</a>* ecore_exe_pipe_run </td> <td>(</td> <td class="paramtype">const char * </td> <td class="paramname"> <em>exe_cmd</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">Ecore_Exe_Flags </td> <td class="paramname"> <em>flags</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const void * </td> <td class="paramname"> <em>data</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td></td> </tr> </table> </div> <div class="memdoc"> <p>Spawns a child process with its stdin/out available for communication. </p> <p>This function forks and runs the given command using <code>/bin/sh</code>.</p> <p>Note that the process handle is only valid until a child process terminated event is received. After all handlers for the child process terminated event have been called, the handle will be freed by Ecore.</p> <p>This function does the same thing as <a class="el" href="group__Ecore__Exe__Basic__Group.html#ga7ee5b2a9c3b1458395ff60287d368faa" title="Spawns a child process.">ecore_exe_run()</a>, but also makes the standard in and/or out as well as stderr from the child process available for reading or writing. To write use <a class="el" href="group__Ecore__Exe__Basic__Group.html#ga52206a534dd6170bb609481093357047" title="Sends data to the given child process which it recieves on stdin.">ecore_exe_send()</a>. To read listen to ECORE_EXE_EVENT_DATA or ECORE_EXE_EVENT_ERROR events (set up handlers). Ecore may buffer read and error data until a newline character if asked for with the <code>flags</code>. All data will be included in the events (newlines will be replaced with NULLS if line buffered). ECORE_EXE_EVENT_DATA events will only happen if the process is run with ECORE_EXE_PIPE_READ enabled in the flags. The same with the error version. Writing will only be allowed with ECORE_EXE_PIPE_WRITE enabled in the flags.</p> <dl><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>exe_cmd</em> </td><td>The command to run with <code>/bin/sh</code>. </td></tr> <tr><td valign="top"></td><td valign="top"><em>flags</em> </td><td>The flag parameters for how to deal with inter-process I/O </td></tr> <tr><td valign="top"></td><td valign="top"><em>data</em> </td><td>Data to attach to the returned process handle. </td></tr> </table> </dd> </dl> <dl class="return"><dt><b>Returns:</b></dt><dd>A process handle to the spawned process. </dd></dl> <p>References <a class="el" href="ecore__events_8c_source.html#l00189">ecore_event_add()</a>, <a class="el" href="ecore__exe_8c_source.html#l00160">ECORE_EXE_EVENT_ADD</a>, <a class="el" href="ecore__exe_8c_source.html#l01047">ecore_exe_free()</a>, <a class="el" href="Ecore_8h_source.html#l00123">ECORE_EXE_PIPE_AUTO</a>, <a class="el" href="Ecore_8h_source.html#l00120">ECORE_EXE_PIPE_ERROR</a>, <a class="el" href="Ecore_8h_source.html#l00118">ECORE_EXE_PIPE_READ</a>, <a class="el" href="Ecore_8h_source.html#l00119">ECORE_EXE_PIPE_WRITE</a>, <a class="el" href="ecore__exe_8c_source.html#l01269">ecore_exe_terminate()</a>, <a class="el" href="Ecore_8h_source.html#l00110">ECORE_FD_READ</a>, <a class="el" href="Ecore_8h_source.html#l00111">ECORE_FD_WRITE</a>, <a class="el" href="ecore__main_8c_source.html#l00419">ecore_main_fd_handler_active_set()</a>, <a class="el" href="ecore__main_8c_source.html#l00252">ecore_main_fd_handler_add()</a>, and <a class="el" href="Ecore_8h_source.html#l00224">_Ecore_Exe_Event_Add::exe</a>.</p> </div> </div> <a class="anchor" id="ga7ee5b2a9c3b1458395ff60287d368faa"></a><!-- doxytag: member="ecore_exe.c::ecore_exe_run" ref="ga7ee5b2a9c3b1458395ff60287d368faa" args="(const char *exe_cmd, const void *data)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">EAPI <a class="el" href="Ecore_8h.html#a16f4610064ba77bb0e3ff20485a6362a">Ecore_Exe</a>* ecore_exe_run </td> <td>(</td> <td class="paramtype">const char * </td> <td class="paramname"> <em>exe_cmd</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const void * </td> <td class="paramname"> <em>data</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td></td> </tr> </table> </div> <div class="memdoc"> <p>Spawns a child process. </p> <p>This is now just a thin wrapper around <a class="el" href="group__Ecore__Exe__Basic__Group.html#ga769740ce38413683fb40ddf725ac54b7" title="Spawns a child process with its stdin/out available for communication.">ecore_exe_pipe_run()</a></p> <dl><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>exe_cmd</em> </td><td>The command to run with <code>/bin/sh</code>. </td></tr> <tr><td valign="top"></td><td valign="top"><em>data</em> </td><td>Data to attach to the returned process handle. </td></tr> </table> </dd> </dl> <dl class="return"><dt><b>Returns:</b></dt><dd>A process handle to the spawned process. </dd></dl> <p>References <a class="el" href="ecore__exe_8c_source.html#l00424">ecore_exe_pipe_run()</a>.</p> </div> </div> <a class="anchor" id="ga572bed12ff3418b8c9f9f0c94793c12c"></a><!-- doxytag: member="ecore_exe.c::ecore_exe_run_priority_get" ref="ga572bed12ff3418b8c9f9f0c94793c12c" args="(void)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">EAPI int ecore_exe_run_priority_get </td> <td>(</td> <td class="paramtype">void </td> <td class="paramname"></td> <td> ) </td> <td></td> </tr> </table> </div> <div class="memdoc"> <p>Gets the priority at which to launch processes. </p> <p>This gets ths priority of launched processes. See <a class="el" href="group__Ecore__Exe__Basic__Group.html#ga52c4ee99d493595fef39026dd2402704" title="Sets the priority at which to launch processes.">ecore_exe_run_priority_set()</a> for details. This just returns the value set by this call.</p> <dl class="return"><dt><b>Returns:</b></dt><dd>the value set by <a class="el" href="group__Ecore__Exe__Basic__Group.html#ga52c4ee99d493595fef39026dd2402704" title="Sets the priority at which to launch processes.">ecore_exe_run_priority_set()</a> </dd></dl> </div> </div> <a class="anchor" id="ga52c4ee99d493595fef39026dd2402704"></a><!-- doxytag: member="ecore_exe.c::ecore_exe_run_priority_set" ref="ga52c4ee99d493595fef39026dd2402704" args="(int pri)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">EAPI void ecore_exe_run_priority_set </td> <td>(</td> <td class="paramtype">int </td> <td class="paramname"> <em>pri</em></td> <td> ) </td> <td></td> </tr> </table> </div> <div class="memdoc"> <p>Sets the priority at which to launch processes. </p> <p>This sets the priority of processes run by <a class="el" href="group__Ecore__Exe__Basic__Group.html#ga7ee5b2a9c3b1458395ff60287d368faa" title="Spawns a child process.">ecore_exe_run()</a> and <a class="el" href="group__Ecore__Exe__Basic__Group.html#ga769740ce38413683fb40ddf725ac54b7" title="Spawns a child process with its stdin/out available for communication.">ecore_exe_pipe_run()</a>. </p> <ul> <li>On Windows, the child process is created by default with the <a class="el" href="Ecore_8h.html#a938d59de6a9385e7d98c4b45f809d23fa9683498607dc0bec65c4252b7e91708e" title="Default priority.">ECORE_EXE_WIN32_PRIORITY_NORMAL</a> priority, unless the calling process is in <a class="el" href="Ecore_8h.html#a938d59de6a9385e7d98c4b45f809d23fa09f6aedb549a47677c3810995128304b" title="Idle priority, for monitoring the system.">ECORE_EXE_WIN32_PRIORITY_IDLE</a> or <a class="el" href="Ecore_8h.html#a938d59de6a9385e7d98c4b45f809d23fa9402a8afb6fbccde2f4b8ea7c8330de6" title="Below default priority.">ECORE_EXE_WIN32_PRIORITY_BELOW_NORMAL</a> priority. In that case, the child process inherits this priority. </li> <li>On other platforms, if set to ECORE_EXE_PRIORITY_INHERIT child processes inherits the priority of their parent. This is the default.</li> </ul> <dl><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>pri</em> </td><td>value a Ecore_Exe_Win32_Priority value on Windows, -20 to 19 or ECORE_EXE_PRIORITY_INHERIT on other OS. </td></tr> </table> </dd> </dl> </div> </div> <a class="anchor" id="ga52206a534dd6170bb609481093357047"></a><!-- doxytag: member="ecore_exe.c::ecore_exe_send" ref="ga52206a534dd6170bb609481093357047" args="(Ecore_Exe *exe, const void *data, int size)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">EAPI Eina_Bool ecore_exe_send </td> <td>(</td> <td class="paramtype"><a class="el" href="Ecore_8h.html#a16f4610064ba77bb0e3ff20485a6362a">Ecore_Exe</a> * </td> <td class="paramname"> <em>exe</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const void * </td> <td class="paramname"> <em>data</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">int </td> <td class="paramname"> <em>size</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td></td> </tr> </table> </div> <div class="memdoc"> <p>Sends data to the given child process which it recieves on stdin. </p> <p>This function writes to a child processes standard in, with unlimited buffering. This call will never block. It may fail if the system runs out of memory.</p> <dl><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>exe</em> </td><td>The child process to send to </td></tr> <tr><td valign="top"></td><td valign="top"><em>data</em> </td><td>The data to send </td></tr> <tr><td valign="top"></td><td valign="top"><em>size</em> </td><td>The size of the data to send, in bytes </td></tr> </table> </dd> </dl> <dl class="return"><dt><b>Returns:</b></dt><dd>EINA_TRUE if successful, EINA_FALSE on failure. </dd></dl> <p>References <a class="el" href="Ecore_8h_source.html#l00111">ECORE_FD_WRITE</a>, and <a class="el" href="ecore__main_8c_source.html#l00419">ecore_main_fd_handler_active_set()</a>.</p> </div> </div> <a class="anchor" id="ga14e23f1d003d3bdd2431176cec009857"></a><!-- doxytag: member="ecore_exe.c::ecore_exe_tag_get" ref="ga14e23f1d003d3bdd2431176cec009857" args="(const Ecore_Exe *exe)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">EAPI const char* ecore_exe_tag_get </td> <td>(</td> <td class="paramtype">const <a class="el" href="Ecore_8h.html#a16f4610064ba77bb0e3ff20485a6362a">Ecore_Exe</a> * </td> <td class="paramname"> <em>exe</em></td> <td> ) </td> <td></td> </tr> </table> </div> <div class="memdoc"> <p>Retrieves the tag attached to the given process handle. </p> <p>There is no need to free it as it just returns the internal pointer value. This value is only valid as long as the <code>exe</code> is valid or until the tag is set to something else on this <code>exe</code>.</p> <dl><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>exe</em> </td><td>The given process handle. </td></tr> </table> </dd> </dl> <dl class="return"><dt><b>Returns:</b></dt><dd>The string attached to <code>exe</code>. It is a handle to existing internal string and should not be modified, use <a class="el" href="group__Ecore__Exe__Basic__Group.html#ga68245a929e914cbe4fb64c287ef3f5ae" title="Sets the string tag for the given process handle.">ecore_exe_tag_set()</a> to change it. It might be <code>NULL</code>. </dd></dl> </div> </div> <a class="anchor" id="ga68245a929e914cbe4fb64c287ef3f5ae"></a><!-- doxytag: member="ecore_exe.c::ecore_exe_tag_set" ref="ga68245a929e914cbe4fb64c287ef3f5ae" args="(Ecore_Exe *exe, const char *tag)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">EAPI void ecore_exe_tag_set </td> <td>(</td> <td class="paramtype"><a class="el" href="Ecore_8h.html#a16f4610064ba77bb0e3ff20485a6362a">Ecore_Exe</a> * </td> <td class="paramname"> <em>exe</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const char * </td> <td class="paramname"> <em>tag</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td></td> </tr> </table> </div> <div class="memdoc"> <p>Sets the string tag for the given process handle. </p> <dl><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>exe</em> </td><td>The given process handle. </td></tr> <tr><td valign="top"></td><td valign="top"><em>tag</em> </td><td>The string tag to set on the process handle. </td></tr> </table> </dd> </dl> </div> </div> </div> <div id="push"></div> </div> <!-- #content --> </div> <!-- .layout --> </div> <!-- #container --> <div id="footer"> <table><tr> <td class="copyright">Copyright ©2010 Enlightenment</td> <td class="generated">Docs generated Fri Jul 2 12:11:49 2010</td> </tr></table> </div> </body> </html>