<?xml version="1.0" encoding="UTF-8"?> <!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" lang="en_US" xml:lang="en_US"> <head> <title>kdesu: PtyProcess Class Reference (kdesu)</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta http-equiv="Content-Style-Type" content="text/css" /> <meta http-equiv="pics-label" content='(pics-1.1 "http://www.icra.org/ratingsv02.html" comment "ICRAonline DE v2.0" l gen true for "http://www.kde.org" r (nz 1 vz 1 lz 1 oz 1 cb 1) "http://www.rsac.org/ratingsv01.html" l gen true for "http://www.kde.org" r (n 0 s 0 v 0 l 0))' /> <meta name="trademark" content="KDE e.V." /> <meta name="description" content="K Desktop Environment Homepage, KDE.org" /> <meta name="MSSmartTagsPreventParsing" content="true" /> <meta name="robots" content="all" /> <link rel="shortcut icon" href="../../favicon.ico" /> <link rel="stylesheet" media="screen" type="text/css" title="APIDOX" href="doxygen.css" /> </head> <body> <div id="nav_header_top" align="right"> <a href="#content" class="doNotDisplay" accesskey="2">Skip to main content ::</a> <a href="../.."><img id="nav_header_logo" alt="Home" align="left" src="../../kde_gear_64.png" border="0" /></a> <span class="doNotDisplay">::</span> <div id="nav_header_title" align="left">KDE API Reference</div> </div> <div id="nav_header_bottom" align="right"> <span class="doNotDisplay">:: <a href="#navigation" accesskey="5">Skip to Link Menu</a><br/></span> <div id="nav_header_bottom_right" style="text-align: left;"> / <a href="../..">API Reference</a> / <a href=".">kdesu</a> </div> </div> <table id="main" border="0" cellpadding="0" cellspacing="0" width="100%"> <tr> <td valign="top" class="menuheader" height="0"></td> <td id="contentcolumn" valign="top" rowspan="2" > <div id="content" style="padding-top: 0px;"><div style="width:100%; margin: 0px; padding: 0px;"> <a name="content"></a> <!-- Generated by Doxygen 1.4.4 --> <h1>PtyProcess Class Reference</h1><!-- doxytag: class="PtyProcess" --><code>#include <<a class="el" href="process_8h-source.html">process.h</a>></code> <p> <p>Inheritance diagram for PtyProcess: <p><center><img src="classPtyProcess.png" usemap="#PtyProcess_map" border="0" alt=""></center> <map name="PtyProcess_map"> <area href="classStubProcess.html" alt="StubProcess" shape="rect" coords="46,56,129,80"> <area href="classSshProcess.html" alt="SshProcess" shape="rect" coords="0,112,83,136"> <area href="classSuProcess.html" alt="SuProcess" shape="rect" coords="93,112,176,136"> </map> <a href="classPtyProcess-members.html">List of all members.</a><hr><a name="_details"></a><h2>Detailed Description</h2> Synchronous communication with tty programs. <p> PtyProcess provides synchronous communication with tty based programs. The communications channel used is a pseudo tty (as opposed to a pipe) This means that programs which require a terminal will work. <p> <p> Definition at line <a class="el" href="process_8h-source.html#l00036">36</a> of file <a class="el" href="process_8h-source.html">process.h</a>.<table border="0" cellpadding="0" cellspacing="0"> <tr><td></td></tr> <tr><td colspan="2"><br><h2>Public Types</h2></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">enum </td><td class="memItemRight" valign="bottom"><a class="el" href="classPtyProcess.html#w3">checkPidStatus</a> { <b>Error</b> = -1, <b>NotExited</b> = -2, <b>Killed</b> = -3 }</td></tr> <tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a0"></a><!-- doxytag: member="PtyProcess::PtyProcess" ref="a0" args="()" --> </td><td class="memItemRight" valign="bottom"><a class="el" href="classPtyProcess.html#a0">PtyProcess</a> ()</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a1"></a><!-- doxytag: member="PtyProcess::~PtyProcess" ref="a1" args="()" --> virtual </td><td class="memItemRight" valign="bottom"><a class="el" href="classPtyProcess.html#a1">~PtyProcess</a> ()</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="classPtyProcess.html#a2">exec</a> (const <a class="elRef" doxygen="qt.tag:" href="qcstring.html">QCString</a> &command, const <a class="elRef" doxygen="qt.tag:" href="qvaluelist.html">QCStringList</a> &args)</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="elRef" doxygen="qt.tag:" href="qcstring.html">QCString</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classPtyProcess.html#a3">readLine</a> (bool block=true)</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classPtyProcess.html#a4">writeLine</a> (const <a class="elRef" doxygen="qt.tag:" href="qcstring.html">QCString</a> &line, bool addNewline=true)</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classPtyProcess.html#a5">unreadLine</a> (const <a class="elRef" doxygen="qt.tag:" href="qcstring.html">QCString</a> &line, bool addNewline=true)</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classPtyProcess.html#a6">setExitString</a> (const <a class="elRef" doxygen="qt.tag:" href="qcstring.html">QCString</a> &exit)</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="classPtyProcess.html#a7">waitForChild</a> ()</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="classPtyProcess.html#a8">WaitSlave</a> ()</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="classPtyProcess.html#a9">enableLocalEcho</a> (bool enable=true)</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classPtyProcess.html#a10">setTerminal</a> (bool terminal)</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classPtyProcess.html#a11">setErase</a> (bool erase)</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classPtyProcess.html#a12">setEnvironment</a> (const <a class="elRef" doxygen="qt.tag:" href="qvaluelist.html">QCStringList</a> &env)</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="classPtyProcess.html#a13">fd</a> ()</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="classPtyProcess.html#a14">pid</a> ()</td></tr> <tr><td colspan="2"><br><h2>Static Public Member Functions</h2></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">static int </td><td class="memItemRight" valign="bottom"><a class="el" href="classPtyProcess.html#e0">waitMS</a> (int fd, int ms)</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">static bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classPtyProcess.html#e1">checkPid</a> (pid_t pid)</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="e2"></a><!-- doxytag: member="PtyProcess::checkPidExited" ref="e2" args="(pid_t pid)" --> static int </td><td class="memItemRight" valign="bottom"><a class="el" href="classPtyProcess.html#e2">checkPidExited</a> (pid_t pid)</td></tr> <tr><td colspan="2"><br><h2>Protected Member Functions</h2></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="b0"></a><!-- doxytag: member="PtyProcess::environment" ref="b0" args="() const " --> const <a class="elRef" doxygen="qt.tag:" href="qvaluelist.html">QCStringList</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="classPtyProcess.html#b0">environment</a> () const </td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="b1"></a><!-- doxytag: member="PtyProcess::virtual_hook" ref="b1" args="(int id, void *data)" --> virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classPtyProcess.html#b1">virtual_hook</a> (int id, void *data)</td></tr> <tr><td colspan="2"><br><h2>Protected Attributes</h2></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="p0"></a><!-- doxytag: member="PtyProcess::m_bErase" ref="p0" args="" --> bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classPtyProcess.html#p0">m_bErase</a></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="p1"></a><!-- doxytag: member="PtyProcess::m_bTerminal" ref="p1" args="" --> bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classPtyProcess.html#p1">m_bTerminal</a></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="p2"></a><!-- doxytag: member="PtyProcess::m_Pid" ref="p2" args="" --> int </td><td class="memItemRight" valign="bottom"><a class="el" href="classPtyProcess.html#p2">m_Pid</a></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="p3"></a><!-- doxytag: member="PtyProcess::m_Fd" ref="p3" args="" --> int </td><td class="memItemRight" valign="bottom"><a class="el" href="classPtyProcess.html#p3">m_Fd</a></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="p4"></a><!-- doxytag: member="PtyProcess::m_Command" ref="p4" args="" --> <a class="elRef" doxygen="qt.tag:" href="qcstring.html">QCString</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classPtyProcess.html#p4">m_Command</a></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="p5"></a><!-- doxytag: member="PtyProcess::m_Exit" ref="p5" args="" --> <a class="elRef" doxygen="qt.tag:" href="qcstring.html">QCString</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classPtyProcess.html#p5">m_Exit</a></td></tr> </table> <hr><h2>Member Enumeration Documentation</h2> <a class="anchor" name="w3"></a><!-- doxytag: member="PtyProcess::checkPidStatus" ref="w3" args="" --><p> <table class="mdTable" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top">enum <a class="el" href="classPtyProcess.html#w3">PtyProcess::checkPidStatus</a> </td> </tr> </table> </td> </tr> </table> <table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td> <p> Check process exit status for process <code>pid</code>. <p> On error (no child, no exit), return -1. If child <code>pid</code> has exited, return its exit status, (which may be zero). If child <code>has</code> not exited, return -2. <p> Definition at line <a class="el" href="process_8h-source.html#l00156">156</a> of file <a class="el" href="process_8h-source.html">process.h</a>. </td> </tr> </table> <hr><h2>Member Function Documentation</h2> <a class="anchor" name="e1"></a><!-- doxytag: member="PtyProcess::checkPid" ref="e1" args="(pid_t pid)" --><p> <table class="mdTable" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top">bool PtyProcess::checkPid </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">pid_t </td> <td class="mdname1" valign="top" nowrap> <em>pid</em> </td> <td class="md" valign="top"> ) </td> <td class="md" nowrap><code> [static]</code></td> </tr> </table> </td> </tr> </table> <table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td> <p> Basic check for the existence of <code>pid</code>. <p> Returns true iff <code>pid</code> is an extant process, (one you could kill - see man kill(2) for signal 0). <p> Definition at line <a class="el" href="process_8cpp-source.html#l00075">75</a> of file <a class="el" href="process_8cpp-source.html">process.cpp</a>. </td> </tr> </table> <a class="anchor" name="a9"></a><!-- doxytag: member="PtyProcess::enableLocalEcho" ref="a9" args="(bool enable=true)" --><p> <table class="mdTable" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top">int PtyProcess::enableLocalEcho </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">bool </td> <td class="mdname1" valign="top" nowrap> <em>enable</em> = <code>true</code> </td> <td class="md" valign="top"> ) </td> <td class="md" nowrap></td> </tr> </table> </td> </tr> </table> <table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td> <p> Enables/disables local echo on the pseudo tty. <p> <p> Definition at line <a class="el" href="process_8cpp-source.html#l00396">396</a> of file <a class="el" href="process_8cpp-source.html">process.cpp</a>. </td> </tr> </table> <a class="anchor" name="a2"></a><!-- doxytag: member="PtyProcess::exec" ref="a2" args="(const QCString &command, const QCStringList &args)" --><p> <table class="mdTable" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top">int PtyProcess::exec </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">const <a class="elRef" doxygen="qt.tag:" href="qcstring.html">QCString</a> & </td> <td class="mdname" nowrap> <em>command</em>, </td> </tr> <tr> <td class="md" nowrap align="right"></td> <td class="md"></td> <td class="md" nowrap>const <a class="elRef" doxygen="qt.tag:" href="qvaluelist.html">QCStringList</a> & </td> <td class="mdname" nowrap> <em>args</em></td> </tr> <tr> <td class="md"></td> <td class="md">) </td> <td class="md" colspan="2"></td> </tr> </table> </td> </tr> </table> <table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td> <p> Forks off and execute a command. <p> The command's standard in and output are connected to the pseudo tty. They are accessible with readLine and writeLine. <dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>command</em> </td><td>The command to execute. </td></tr> <tr><td valign="top"></td><td valign="top"><em>args</em> </td><td>The arguments to the command.</td></tr> </table> </dl> <p> Definition at line <a class="el" href="process_8cpp-source.html#l00270">270</a> of file <a class="el" href="process_8cpp-source.html">process.cpp</a>. </td> </tr> </table> <a class="anchor" name="a13"></a><!-- doxytag: member="PtyProcess::fd" ref="a13" args="()" --><p> <table class="mdTable" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top">int PtyProcess::fd </td> <td class="md" valign="top">( </td> <td class="mdname1" valign="top" nowrap> </td> <td class="md" valign="top"> ) </td> <td class="md" nowrap><code> [inline]</code></td> </tr> </table> </td> </tr> </table> <table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td> <p> Returns the filedescriptor of the process. <p> <p> Definition at line <a class="el" href="process_8h-source.html#l00115">115</a> of file <a class="el" href="process_8h-source.html">process.h</a>. </td> </tr> </table> <a class="anchor" name="a14"></a><!-- doxytag: member="PtyProcess::pid" ref="a14" args="()" --><p> <table class="mdTable" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top">int PtyProcess::pid </td> <td class="md" valign="top">( </td> <td class="mdname1" valign="top" nowrap> </td> <td class="md" valign="top"> ) </td> <td class="md" nowrap><code> [inline]</code></td> </tr> </table> </td> </tr> </table> <table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td> <p> Returns the pid of the process. <p> <p> Definition at line <a class="el" href="process_8h-source.html#l00120">120</a> of file <a class="el" href="process_8h-source.html">process.h</a>. </td> </tr> </table> <a class="anchor" name="a3"></a><!-- doxytag: member="PtyProcess::readLine" ref="a3" args="(bool block=true)" --><p> <table class="mdTable" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"><a class="elRef" doxygen="qt.tag:" href="qcstring.html">QCString</a> PtyProcess::readLine </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">bool </td> <td class="mdname1" valign="top" nowrap> <em>block</em> = <code>true</code> </td> <td class="md" valign="top"> ) </td> <td class="md" nowrap></td> </tr> </table> </td> </tr> </table> <table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td> <p> Reads a line from the program's standard out. <p> Depending on the <em>block</em> parameter, this call blocks until a single, full line is read. <dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>block</em> </td><td>Block until a full line is read? </td></tr> </table> </dl> <dl compact><dt><b>Returns:</b></dt><dd>The output string.</dd></dl> <p> Definition at line <a class="el" href="process_8cpp-source.html#l00175">175</a> of file <a class="el" href="process_8cpp-source.html">process.cpp</a>. </td> </tr> </table> <a class="anchor" name="a12"></a><!-- doxytag: member="PtyProcess::setEnvironment" ref="a12" args="(const QCStringList &env)" --><p> <table class="mdTable" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top">void PtyProcess::setEnvironment </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">const <a class="elRef" doxygen="qt.tag:" href="qvaluelist.html">QCStringList</a> & </td> <td class="mdname1" valign="top" nowrap> <em>env</em> </td> <td class="md" valign="top"> ) </td> <td class="md" nowrap></td> </tr> </table> </td> </tr> </table> <table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td> <p> Set additinal environment variables. <p> <p> Definition at line <a class="el" href="process_8cpp-source.html#l00159">159</a> of file <a class="el" href="process_8cpp-source.html">process.cpp</a>. </td> </tr> </table> <a class="anchor" name="a11"></a><!-- doxytag: member="PtyProcess::setErase" ref="a11" args="(bool erase)" --><p> <table class="mdTable" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top">void PtyProcess::setErase </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">bool </td> <td class="mdname1" valign="top" nowrap> <em>erase</em> </td> <td class="md" valign="top"> ) </td> <td class="md" nowrap><code> [inline]</code></td> </tr> </table> </td> </tr> </table> <table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td> <p> Overwrites the password as soon as it is used. <p> Relevant only to some subclasses. <p> Definition at line <a class="el" href="process_8h-source.html#l00105">105</a> of file <a class="el" href="process_8h-source.html">process.h</a>. </td> </tr> </table> <a class="anchor" name="a6"></a><!-- doxytag: member="PtyProcess::setExitString" ref="a6" args="(const QCString &exit)" --><p> <table class="mdTable" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top">void PtyProcess::setExitString </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">const <a class="elRef" doxygen="qt.tag:" href="qcstring.html">QCString</a> & </td> <td class="mdname1" valign="top" nowrap> <em>exit</em> </td> <td class="md" valign="top"> ) </td> <td class="md" nowrap><code> [inline]</code></td> </tr> </table> </td> </tr> </table> <table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td> <p> Sets the exit string. <p> If a line of program output matches this, <a class="el" href="classPtyProcess.html#a7">waitForChild()</a> will terminate the program and return. <p> Definition at line <a class="el" href="process_8h-source.html#l00077">77</a> of file <a class="el" href="process_8h-source.html">process.h</a>. </td> </tr> </table> <a class="anchor" name="a10"></a><!-- doxytag: member="PtyProcess::setTerminal" ref="a10" args="(bool terminal)" --><p> <table class="mdTable" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top">void PtyProcess::setTerminal </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">bool </td> <td class="mdname1" valign="top" nowrap> <em>terminal</em> </td> <td class="md" valign="top"> ) </td> <td class="md" nowrap><code> [inline]</code></td> </tr> </table> </td> </tr> </table> <table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td> <p> Enables/disables terminal output. <p> Relevant only to some subclasses. <p> Definition at line <a class="el" href="process_8h-source.html#l00099">99</a> of file <a class="el" href="process_8h-source.html">process.h</a>. </td> </tr> </table> <a class="anchor" name="a5"></a><!-- doxytag: member="PtyProcess::unreadLine" ref="a5" args="(const QCString &line, bool addNewline=true)" --><p> <table class="mdTable" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top">void PtyProcess::unreadLine </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">const <a class="elRef" doxygen="qt.tag:" href="qcstring.html">QCString</a> & </td> <td class="mdname" nowrap> <em>line</em>, </td> </tr> <tr> <td class="md" nowrap align="right"></td> <td class="md"></td> <td class="md" nowrap>bool </td> <td class="mdname" nowrap> <em>addNewline</em> = <code>true</code></td> </tr> <tr> <td class="md"></td> <td class="md">) </td> <td class="md" colspan="2"></td> </tr> </table> </td> </tr> </table> <table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td> <p> Puts back a line of input. <p> <dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>line</em> </td><td>The line to put back. </td></tr> <tr><td valign="top"></td><td valign="top"><em>addNewline</em> </td><td>Adds a '<br> ' to the line.</td></tr> </table> </dl> <p> Definition at line <a class="el" href="process_8cpp-source.html#l00257">257</a> of file <a class="el" href="process_8cpp-source.html">process.cpp</a>. </td> </tr> </table> <a class="anchor" name="a7"></a><!-- doxytag: member="PtyProcess::waitForChild" ref="a7" args="()" --><p> <table class="mdTable" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top">int PtyProcess::waitForChild </td> <td class="md" valign="top">( </td> <td class="mdname1" valign="top" nowrap> </td> <td class="md" valign="top"> ) </td> <td class="md" nowrap></td> </tr> </table> </td> </tr> </table> <table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td> <p> Waits for the child to exit. <p> See also setExitString. <p> Definition at line <a class="el" href="process_8cpp-source.html#l00432">432</a> of file <a class="el" href="process_8cpp-source.html">process.cpp</a>. </td> </tr> </table> <a class="anchor" name="e0"></a><!-- doxytag: member="PtyProcess::waitMS" ref="e0" args="(int fd, int ms)" --><p> <table class="mdTable" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top">int PtyProcess::waitMS </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">int </td> <td class="mdname" nowrap> <em>fd</em>, </td> </tr> <tr> <td class="md" nowrap align="right"></td> <td class="md"></td> <td class="md" nowrap>int </td> <td class="mdname" nowrap> <em>ms</em></td> </tr> <tr> <td class="md"></td> <td class="md">) </td> <td class="md" colspan="2"><code> [static]</code></td> </tr> </table> </td> </tr> </table> <table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td> <p> Wait <code>ms</code> miliseconds (ie. <p> 1/10th of a second is 100ms), using <code>fd</code> as a filedescriptor to wait on. Returns select(2)'s result, which is -1 on error, 0 on timeout, or positive if there is data on one of the selected fd's.<p> <code>ms</code> must be in the range 0..999 (ie. the maximum wait duration is 999ms, almost one second). <p> Definition at line <a class="el" href="process_8cpp-source.html#l00059">59</a> of file <a class="el" href="process_8cpp-source.html">process.cpp</a>. </td> </tr> </table> <a class="anchor" name="a8"></a><!-- doxytag: member="PtyProcess::WaitSlave" ref="a8" args="()" --><p> <table class="mdTable" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top">int PtyProcess::WaitSlave </td> <td class="md" valign="top">( </td> <td class="mdname1" valign="top" nowrap> </td> <td class="md" valign="top"> ) </td> <td class="md" nowrap></td> </tr> </table> </td> </tr> </table> <table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td> <p> Waits until the pty has cleared the ECHO flag. <p> This is useful when programs write a password prompt before they disable ECHO. Disabling it might flush any input that was written. <p> Definition at line <a class="el" href="process_8cpp-source.html#l00358">358</a> of file <a class="el" href="process_8cpp-source.html">process.cpp</a>. </td> </tr> </table> <a class="anchor" name="a4"></a><!-- doxytag: member="PtyProcess::writeLine" ref="a4" args="(const QCString &line, bool addNewline=true)" --><p> <table class="mdTable" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top">void PtyProcess::writeLine </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">const <a class="elRef" doxygen="qt.tag:" href="qcstring.html">QCString</a> & </td> <td class="mdname" nowrap> <em>line</em>, </td> </tr> <tr> <td class="md" nowrap align="right"></td> <td class="md"></td> <td class="md" nowrap>bool </td> <td class="mdname" nowrap> <em>addNewline</em> = <code>true</code></td> </tr> <tr> <td class="md"></td> <td class="md">) </td> <td class="md" colspan="2"></td> </tr> </table> </td> </tr> </table> <table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td> <p> Writes a line of text to the program's standard in. <p> <dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>line</em> </td><td>The text to write. </td></tr> <tr><td valign="top"></td><td valign="top"><em>addNewline</em> </td><td>Adds a '<br> ' to the line.</td></tr> </table> </dl> <p> Definition at line <a class="el" href="process_8cpp-source.html#l00248">248</a> of file <a class="el" href="process_8cpp-source.html">process.cpp</a>. </td> </tr> </table> <hr>The documentation for this class was generated from the following files:<ul> <li><a class="el" href="process_8h-source.html">process.h</a><li><a class="el" href="process_8cpp-source.html">process.cpp</a></ul> </div></div> </td> </tr> <tr> <td valign="top" id="leftmenu" width="25%"> <a name="navigation"></a> <div class="menu_box"><h2>kdesu</h2> <div class="nav_list"> <ul><li><a href="index.html">Main Page</a></li><li><a href="hierarchy.html">Class Hierarchy</a></li><li><a href="classes.html">Alphabetical List</a></li><li><a href="annotated.html">Class List</a></li><li><a href="files.html">File List</a></li><li><a href="dirs.html">Directories</a></li><li><a href="functions.html">Class Members</a></li><li><a href="pages.html">Related Pages</a></li></ul> <!-- <h2>Class Picker</h2> <div style="text-align: center;"> <form name="guideform"> <select name="guidelinks" style="width:100%;" onChange="window.location=document.guideform.guidelinks.options[document.guideform.guidelinks.selectedIndex].value"> <option value="annotated.html">-- Choose --</option> <option value="classKCookie.html">kcookie</option>, <option value="classKDEsuClient.html">kdesuclient</option>, <option value="classPTY.html">pty</option>, <option value="classPtyProcess.html">ptyprocess</option>, <option value="classSshProcess.html">sshprocess</option>, <option value="classStubProcess.html">stubprocess</option>, <option value="classSuProcess.html">suprocess</option>, </select> </form> </div> --> </div></div> <div class="menu_box"><h2>API Dox</h2> <div class="nav_list"> <ul> <li><a href="../../arts/html/index.html">arts</a></li><li><a href="../../dcop/html/index.html">dcop</a></li><li><a href="../../dnssd/html/index.html">dnssd</a></li><li><a href="../../interfaces/html/index.html">interfaces</a></li><li> <a href="../../interfaces/kimproxy/interface/html/index.html">interface</a></li><li> <a href="../../interfaces/kimproxy/library/html/index.html">library</a></li><li> <a href="../../interfaces/kspeech/html/index.html">kspeech</a></li><li> <a href="../../interfaces/ktexteditor/html/index.html">ktexteditor</a></li><li><a href="../../kabc/html/index.html">kabc</a></li><li><a href="../../kate/html/index.html">kate</a></li><li><a href="../../kcmshell/html/index.html">kcmshell</a></li><li><a href="../../kdecore/html/index.html">kdecore</a></li><li><a href="../../kded/html/index.html">kded</a></li><li><a href="../../kdefx/html/index.html">kdefx</a></li><li><a href="../../kdeprint/html/index.html">kdeprint</a></li><li><a href="../../kdesu/html/index.html">kdesu</a></li><li><a href="../../kdeui/html/index.html">kdeui</a></li><li><a href="../../kdoctools/html/index.html">kdoctools</a></li><li><a href="../../khtml/html/index.html">khtml</a></li><li><a href="../../kimgio/html/index.html">kimgio</a></li><li><a href="../../kinit/html/index.html">kinit</a></li><li><a href="../../kio/html/index.html">kio</a></li><li> <a href="../../kio/bookmarks/html/index.html">bookmarks</a></li><li> <a href="../../kio/httpfilter/html/index.html">httpfilter</a></li><li> <a href="../../kio/kfile/html/index.html">kfile</a></li><li> <a href="../../kio/kio/html/index.html">kio</a></li><li> <a href="../../kio/kioexec/html/index.html">kioexec</a></li><li> <a href="../../kio/kpasswdserver/html/index.html">kpasswdserver</a></li><li> <a href="../../kio/kssl/html/index.html">kssl</a></li><li><a href="../../kioslave/html/index.html">kioslave</a></li><li> <a href="../../kioslave/http/html/index.html">http</a></li><li><a href="../../kjs/html/index.html">kjs</a></li><li><a href="../../kmdi/html/index.html">kmdi</a></li><li> <a href="../../kmdi/kmdi/html/index.html">kmdi</a></li><li><a href="../../knewstuff/html/index.html">knewstuff</a></li><li><a href="../../kparts/html/index.html">kparts</a></li><li><a href="../../kresources/html/index.html">kresources</a></li><li><a href="../../kspell2/html/index.html">kspell2</a></li><li><a href="../../kunittest/html/index.html">kunittest</a></li><li><a href="../../kutils/html/index.html">kutils</a></li><li><a href="../../kwallet/html/index.html">kwallet</a></li><li><a href="../../libkmid/html/index.html">libkmid</a></li><li><a href="../../libkscreensaver/html/index.html">libkscreensaver</a></li> </ul></div></div> </td> </tr> </table> <span class="doNotDisplay"> <a href="http://www.kde.org/" accesskey="8">KDE Home</a> | <a href="http://accessibility.kde.org/" accesskey="9">KDE Accessibility Home</a> | <a href="http://www.kde.org/media/accesskeys.php" accesskey="0">Description of Access Keys</a> </span> <div style="height: 8px"></div> <div id="footer"> <div id="footer_left"> Maintained by <a href="mailto:groot@kde.org">Adriaan de Groot</a> and <a href="mailto:winter@kde.org">Allen Winter</a>. <br/> KDE and K Desktop Environment are trademarks of <a href="http://www.kde.org/areas/kde-ev/" title="Homepage of the KDE non-profit Organization">KDE e.V.</a> | <a href="http://www.kde.org/contact/impressum.php">Legal</a> </div> <div id="footer_right"><img src="/media/images/footer_right.png" style="margin: 0px" alt="" /></div> </div> <!-- WARNING: DO NOT SEND MAIL TO THE FOLLOWING EMAIL ADDRESS! YOU WILL BE BLOCKED INSTANTLY AND PERMANENTLY! <a href="mailto:aaaatrap-425acc3b5374943f@kde.org">Block me</a> WARNING END --> </body> </html>