Sophie

Sophie

distrib > Mandriva > 8.2 > i586 > by-pkgid > 6282078ae76a671f49c6af38c67b1a07 > files > 528

kdelibs-devel-2.2.2-49.2mdk.i586.rpm

<HTML>
<HEAD>
<TITLE>class KShellProcess</TITLE>

<META NAME="Generator" CONTENT="KDOC ">
</HEAD>
<BODY bgcolor="#ffffff" text="#000000" link="#0000ff" vlink="#000099" alink= "#ffffff">
<TABLE WIDTH="100%" BORDER="0">
<TR>
<TD>
	<TABLE BORDER="0">
		<TR><TD valign="top" align="left" cellspacing="10">
		<h1>class KShellProcess</h1>
		</TD>
		<TD valign="top" align="right" colspan="1">A class derived from <A HREF="KProcess.html">KProcess</A> to start child
   	processes through a shell.
 <small><A HREF="#longdesc">More...</A></small></TD></TR>
	</TABLE>
	<HR>
	<TABLE BORDER="0">
		<TR><TH>Definition</TH><TD><code>#include &lt;<A HREF="kprocess_h.html">kprocess.h</A>&gt;</code></TD></TR>
<TR><TH>Inherits</TH><TD><A HREF="KProcess.html">KProcess</A> <small>[public ]</small></TD></TR>
<TR><TH><A HREF="full-list-KShellProcess.html">List of all Methods</A></TH></TR>
	</TABLE>
	</TD>
<TD align="right"><TABLE BORDER="0"><TR><TD><small><A HREF="index-long.html">Annotated List</A></small></TD></TR>
<TR><TD><small><A HREF="header-list.html">Files</A></small></TD></TR>
<TR><TD><small><A HREF="all-globals.html">Globals</A></small></TD></TR>
<TR><TD><small><A HREF="hier.html">Hierarchy</A></small></TD></TR>
<TR><TD><small><A HREF="index.html">Index</A></small></TD></TR>
</TABLE></TD></TR></TABLE>
<h4>Public Methods</h4><ul><LI>&nbsp;<b><A HREF="#ref1">KShellProcess</A></b> (const char *shellname=0) 
</LI>
<LI>&nbsp;<b><A HREF="#ref2">~KShellProcess</A></b> () 
</LI>
<LI>virtual  bool &nbsp;<b><A HREF="#ref3">start</A></b> (RunMode  runmode = NotifyOnExit,
		  Communication comm = NoCommunication) 
</LI>
</ul><h4>Public Static Methods</h4><ul><LI>static  <A HREF="../../../../../../../../../usr/share/doc/qt-2.3.1/html/qstring.html">QString</A> &nbsp;<b><A HREF="#ref4">quote</A></b> (const <A HREF="../../../../../../../../../usr/share/doc/qt-2.3.1/html/qstring.html">QString</A> &arg) 
</LI>
</ul><HR><H2><A NAME="longdesc">Detailed Description</A></H2><p>
 This class is similar to <A HREF="KProcess.html">KProcess</A>. The only difference is that
 KShellProcess runs the specified executable through a UN*X shell so
 that standard shell mechanisms like wildcard matching, use of pipes
 and environment variable expansion will work.
</p>
<p> For example, you could run commands like the following through
 KShellProcess:
</p>
<p></p><table border="0" width="100%">
<tr>
<td bgcolor="#BEEAE0">
<pre>

   ls ~/HOME/ *.lyx | sort | uniq |wc -l

</pre>
</td></tr>

</table> <p>
</p>
<p> KShellProcess tries really hard to find a valid executable shell. Here
 is the algorithm used for finding an executable shell:
</p>
<p></p>

<ul>
<li>Try the executable pointed to by the "SHELL" environment
    variable with whitespaces stripped off
</li>
</ul>

<p>
</p>
<p></p>

<ul>
<li>If your process runs with uid != euid or gid != egid, a shell
    not listed in /etc/shells will not used.
</li>
</ul>

<p>
</p>
<p></p>

<ul>
<li>If no valid shell could be found, "/bin/sh" is used as a last resort.
</li>
</ul>

<p>
</p>
<p></p>
<A NAME="KShellProcess"></A><A NAME="ref1"></A><table width="100%"><tr bgcolor="#eeeeee"><td>&nbsp;<strong>KShellProcess</strong> (const char *shellname=0)
<br></td><td align="right"><h3><strong>KShellProcess</strong></h3></td></tr></table><p></p><p>
      Constructor
</p>
<p>      By specifying the name of a shell (like "/bin/bash") you can override
      the mechanism for finding a valid shell as described in the detailed
      description of this class.
  </p>
<A NAME="~KShellProcess"></A><A NAME="ref2"></A><table width="100%"><tr bgcolor="#eeeeee"><td>&nbsp;<strong>~KShellProcess</strong> ()
<br></td><td align="right"><h3><strong>~KShellProcess</strong></h3></td></tr></table><p></p><p>
 Descructor.
   </p>
<A NAME="start"></A><A NAME="ref3"></A><table width="100%"><tr bgcolor="#eeeeee"><td> bool &nbsp;<strong>start</strong> (RunMode  runmode = NotifyOnExit,
		  Communication comm = NoCommunication)
<br></td><td align="right"><h3><strong>start</strong></h3></td></tr></table><p> <small>[virtual]</small></p><p>
    Starts up the process. -- For a detailed description
    have a look at the "start" member function and the detailed
    description of <A HREF="KProcess.html">KProcess</A> .
  </p>
<p>Reimplemented from <A HREF="KProcess.html#start">KProcess</A>.</p>
<A NAME="quote"></A><A NAME="ref4"></A><table width="100%"><tr bgcolor="#eeeeee"><td> <A HREF="../../../../../../../../../usr/share/doc/qt-2.3.1/html/qstring.html">QString</A> &nbsp;<strong>quote</strong> (const <A HREF="../../../../../../../../../usr/share/doc/qt-2.3.1/html/qstring.html">QString</A> &arg)
<br></td><td align="right"><h3><strong>quote</strong></h3></td></tr></table><p> <small>[static]</small></p><p>
 This function can be used to quote an argument string such that
 the shell processes it properly. This is e. g. necessary for
 user-provided file names which may contain spaces or quotes.
 It also prevents expansion of wildcards and environment variables.
   </p>
<HR><UL><LI><i>Version</i>: $Id: kprocess.h,v 1.41 2001/05/02 13:44:45 lunakl Exp $
</LI><LI><i>Author</i>: Christian Czezakte <e9025461@student.tuwien.ac.at>
</LI><LI><i>Generated</i>: qateam on updates.mandrakesoft.com on Mon Dec 30 16:08:56 2002, using kdoc 2.0a53.</LI></UL></BODY></HTML>