• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdelibs API Reference
  • KDE Home
  • Contact Us
 

KDE3Support

Public Member Functions | Static Public Member Functions | List of all members
K3ShellProcess Class Reference

#include <k3process.h>

Inheritance diagram for K3ShellProcess:
Inheritance graph
[legend]

Public Member Functions

 K3ShellProcess (const char *shellname=0)
 
 ~K3ShellProcess ()
 
virtual bool start (RunMode runmode=NotifyOnExit, Communication comm=NoCommunication)
 
- Public Member Functions inherited from K3Process
 K3Process (QObject *parent=0L)
 
virtual ~K3Process ()
 
const QList< QByteArray > & args ()
 
void clearArguments ()
 
void closeAll ()
 
bool closePty ()
 
bool closeStderr ()
 
bool closeStdin ()
 
bool closeStdout ()
 
bool coreDumped () const
 
void detach ()
 
int exitSignal () const
 
int exitStatus () const
 
bool isRunning () const
 
virtual bool kill (int signo=SIGTERM)
 
bool normalExit () const
 
K3Process & operator<< (const QString &arg)
 
K3Process & operator<< (const char *arg)
 
K3Process & operator<< (const QByteArray &arg)
 
K3Process & operator<< (const QStringList &args)
 
pid_t pid () const
 
KPty * pty () const
 
void resume ()
 
bool runPrivileged () const
 
void setEnvironment (const QString &name, const QString &value)
 
bool setPriority (int prio)
 
void setRunPrivileged (bool keepPrivileges)
 
void setUsePty (Communication comm, bool addUtmp)
 
void setUseShell (bool useShell, const char *shell=0)
 
void setWorkingDirectory (const QString &dir)
 
bool signalled () const
 
void suspend ()
 
bool wait (int timeout=-1)
 
bool writeStdin (const char *buffer, int buflen)
 
- Public Member Functions inherited from QObject
 QObject (QObject *parent)
 
 QObject (QObject *parent, const char *name)
 
virtual  ~QObject ()
 
bool blockSignals (bool block)
 
QObject * child (const char *objName, const char *inheritsClass, bool recursiveSearch) const
 
const QObjectList & children () const
 
const char * className () const
 
bool connect (const QObject *sender, const char *signal, const char *method, Qt::ConnectionType type) const
 
void deleteLater ()
 
void destroyed (QObject *obj)
 
bool disconnect (const QObject *receiver, const char *method)
 
bool disconnect (const char *signal, const QObject *receiver, const char *method)
 
void dumpObjectInfo ()
 
void dumpObjectTree ()
 
QList< QByteArray > dynamicPropertyNames () const
 
virtual bool event (QEvent *e)
 
virtual bool eventFilter (QObject *watched, QEvent *event)
 
T findChild (const QString &name) const
 
QList< T > findChildren (const QRegExp &regExp) const
 
QList< T > findChildren (const QString &name) const
 
bool inherits (const char *className) const
 
void insertChild (QObject *object)
 
void installEventFilter (QObject *filterObj)
 
bool isA (const char *className) const
 
bool isWidgetType () const
 
void killTimer (int id)
 
virtual const QMetaObject * metaObject () const
 
void moveToThread (QThread *targetThread)
 
const char * name () const
 
const char * name (const char *defaultName) const
 
QString objectName () const
 
QObject * parent () const
 
QVariant property (const char *name) const
 
void removeChild (QObject *object)
 
void removeEventFilter (QObject *obj)
 
void setName (const char *name)
 
void setObjectName (const QString &name)
 
void setParent (QObject *parent)
 
bool setProperty (const char *name, const QVariant &value)
 
bool signalsBlocked () const
 
int startTimer (int interval)
 
QThread * thread () const
 

Static Public Member Functions

static QString quote (const QString &arg)
 
- Static Public Member Functions inherited from K3Process
static QString quote (const QString &arg)
 
- Static Public Member Functions inherited from QObject
bool connect (const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
 
bool connect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method, Qt::ConnectionType type)
 
bool disconnect (const QObject *sender, const char *signal, const QObject *receiver, const char *method)
 
bool disconnect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method)
 
QString tr (const char *sourceText, const char *disambiguation, int n)
 
QString trUtf8 (const char *sourceText, const char *disambiguation, int n)
 

Additional Inherited Members

- Public Types inherited from K3Process
enum  {
  PrioLowest = 20, PrioLow = 10, PrioLower = 5, PrioNormal = 0,
  PrioHigher = -5, PrioHigh = -10, PrioHighest = -19
}
 
enum  CommunicationFlag {
  NoCommunication = 0, Stdin = 1, Stdout = 2, Stderr = 4,
  AllOutput = 6, All = 7, NoRead = 8, CTtyOnly = NoRead,
  MergedStderr = 16
}
 
enum  RunMode { DontCare, NotifyOnExit, Block, OwnGroup }
 
- Signals inherited from K3Process
void processExited (K3Process *proc)
 
void receivedStderr (K3Process *proc, char *buffer, int buflen)
 
void receivedStdout (K3Process *proc, char *buffer, int buflen)
 
void receivedStdout (int fd, int &len)
 
void wroteStdin (K3Process *proc)
 
- Protected Slots inherited from K3Process
void slotChildError (int fdno)
 
void slotChildOutput (int fdno)
 
void slotSendData (int dummy)
 
- Protected Member Functions inherited from K3Process
int childError (int fdno)
 
int childOutput (int fdno)
 
virtual void commClose ()
 
virtual int commSetupDoneC ()
 
virtual int commSetupDoneP ()
 
virtual void processHasExited (int state)
 
void setBinaryExecutable (const char *filename)
 
virtual int setupCommunication (Communication comm)
 
void setupEnvironment ()
 
- Protected Member Functions inherited from QObject
bool checkConnectArgs (const char *signal, const QObject *object, const char *method)
 
virtual void childEvent (QChildEvent *event)
 
virtual void connectNotify (const char *signal)
 
virtual void customEvent (QEvent *event)
 
virtual void disconnectNotify (const char *signal)
 
int receivers (const char *signal) const
 
QObject * sender () const
 
int senderSignalIndex () const
 
virtual void timerEvent (QTimerEvent *event)
 
- Static Protected Member Functions inherited from QObject
QByteArray normalizeSignalSlot (const char *signalSlot)
 
- Protected Attributes inherited from K3Process
QList< QByteArray > arguments
 
Communication communication
 
int err [2]
 
QSocketNotifier * errnot
 
int in [2]
 
QSocketNotifier * innot
 
const char * input_data
 
int input_sent
 
int input_total
 
bool keepPrivs
 
int out [2]
 
QSocketNotifier * outnot
 
pid_t pid_
 
RunMode run_mode
 
bool runs
 
int status
 
- Properties inherited from QObject
 objectName
 

Detailed Description

A class derived from K3Process to start child processes through a shell.

Deprecated:

Use K3Process and K3Process::setUseShell(true) instead.

Author
Christian Czezatke e9025.nosp@m.461@.nosp@m.stude.nosp@m.nt.t.nosp@m.uwien.nosp@m..ac..nosp@m.at

Definition at line 860 of file k3process.h.

Constructor & Destructor Documentation

K3ShellProcess::K3ShellProcess ( const char *  shellname = 0)
explicit

Constructor.

If no shellname is specified, the user's default shell is used.

Definition at line 1032 of file k3process.cpp.

K3ShellProcess::~K3ShellProcess ( )

Destructor.

Definition at line 1038 of file k3process.cpp.

Member Function Documentation

QString K3ShellProcess::quote ( const QString &  arg)
static

Definition at line 1041 of file k3process.cpp.

bool K3ShellProcess::start ( RunMode  runmode = NotifyOnExit,
Communication  comm = NoCommunication 
)
virtual

Starts the process.

For a detailed description of the various run modes and communication semantics, have a look at the general description of the K3Process class. Note that if you use setUsePty( Stdout | Stderr, <bool> ), you cannot use Stdout | Stderr here - instead, use Stdout only to receive the mixed output.

The following problems could cause this function to return false:

  • The process is already running.
  • The command line argument list is empty.
  • The the comm parameter is incompatible with the selected pty usage.
  • The starting of the process failed (could not fork).
  • The executable was not found.
Parameters
runmodeThe Run-mode for the process.
commSpecifies which communication channels should be established to the child process (stdin/stdout/stderr). By default, no communication takes place and the respective communication signals will never get emitted.
Returns
true on success, false on error (see above for error conditions)

Reimplemented from K3Process.

Definition at line 1046 of file k3process.cpp.


The documentation for this class was generated from the following files:
  • k3process.h
  • k3process.cpp
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:26:48 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KDE3Support

Skip menu "KDE3Support"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdelibs API Reference

Skip menu "kdelibs API Reference"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal