• Skip to content
  • Skip to link menu
Trinity API Reference
  • Trinity API Reference
  • tdecore
 

tdecore

Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
KShellProcess Class Reference

#include <tdeprocess.h>

Inheritance diagram for KShellProcess:
TDEProcess

Public Member Functions

 KShellProcess (const char *shellname=0)
 
 ~KShellProcess ()
 
virtual bool start (RunMode runmode=NotifyOnExit, Communication comm=NoCommunication)
 
- Public Member Functions inherited from TDEProcess
 TDEProcess (TQObject *parent, const char *name=0)
 
 TDEProcess ()
 
virtual ~TDEProcess ()
 
bool setExecutable (const TQString &proc) TDE_DEPRECATED
 
TDEProcess & operator<< (const TQString &arg)
 
TDEProcess & operator<< (const char *arg)
 
TDEProcess & operator<< (const TQCString &arg)
 
TDEProcess & operator<< (const TQStringList &args)
 
void clearArguments ()
 
virtual bool start (RunMode runmode=NotifyOnExit, Communication comm=NoCommunication)
 
virtual bool kill (int signo=SIGTERM)
 
bool isRunning () const
 
pid_t pid () const
 
TDE_DEPRECATED pid_t getPid () const
 
void suspend ()
 
void resume ()
 
bool wait (int timeout=-1)
 
bool normalExit () const
 
bool signalled () const
 
bool coreDumped () const
 
int exitStatus () const
 
int exitSignal () const
 
bool writeStdin (const char *buffer, int buflen)
 
bool closeStdin ()
 
bool closeStdout ()
 
bool closeStderr ()
 
bool closePty ()
 
void closeAll ()
 
const TQValueList< TQCString > & args ()
 
void setRunPrivileged (bool keepPrivileges)
 
bool runPrivileged () const
 
void setEnvironment (const TQString &name, const TQString &value)
 
void setWorkingDirectory (const TQString &dir)
 
void setUseShell (bool useShell, const char *shell=0)
 
void detach ()
 
void setUsePty (Communication comm, bool addUtmp)
 
KPty * pty () const
 
bool setPriority (int prio)
 

Static Public Member Functions

static TQString quote (const TQString &arg)
 
- Static Public Member Functions inherited from TDEProcess
static TQString quote (const TQString &arg)
 

Protected Member Functions

virtual void virtual_hook (int id, void *data)
 
- Protected Member Functions inherited from TDEProcess
void setupEnvironment ()
 
virtual int setupCommunication (Communication comm)
 
virtual int commSetupDoneP ()
 
virtual int commSetupDoneC ()
 
virtual void processHasExited (int state)
 
virtual void commClose ()
 
void setBinaryExecutable (const char *filename)
 
int childOutput (int fdno)
 
int childError (int fdno)
 
virtual void virtual_hook (int id, void *data)
 

Additional Inherited Members

- Public Types inherited from TDEProcess
enum  Communication {
  NoCommunication = 0 , Stdin = 1 , Stdout = 2 , Stderr = 4 ,
  AllOutput = 6 , All = 7 , NoRead = 8 , CTtyOnly = NoRead ,
  MergedStderr = 16
}
 
enum  RunMode { DontCare , NotifyOnExit , Block , OwnGroup }
 
enum  {
  PrioLowest = 20 , PrioLow = 10 , PrioLower = 5 , PrioNormal = 0 ,
  PrioHigher = -5 , PrioHigh = -10 , PrioHighest = -19
}
 
- Signals inherited from TDEProcess
void processExited (TDEProcess *proc)
 
void receivedStdout (TDEProcess *proc, char *buffer, int buflen)
 
void receivedStdout (int fd, int &len)
 
void receivedStderr (TDEProcess *proc, char *buffer, int buflen)
 
void wroteStdin (TDEProcess *proc)
 
- Protected Slots inherited from TDEProcess
void slotChildOutput (int fdno)
 
void slotChildError (int fdno)
 
void slotSendData (int dummy)
 
- Protected Attributes inherited from TDEProcess
TQValueList< TQCString > arguments
 
RunMode run_mode
 
bool runs
 
pid_t pid_
 
int status
 
bool keepPrivs
 
int out [2]
 
int in [2]
 
int err [2]
 
TQSocketNotifier * innot
 
TQSocketNotifier * outnot
 
TQSocketNotifier * errnot
 
Communication communication
 
const char * input_data
 
int input_sent
 
int input_total
 

Detailed Description

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

Deprecated:

Use TDEProcess and TDEProcess::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 904 of file tdeprocess.h.

Constructor & Destructor Documentation

◆ KShellProcess()

KShellProcess::KShellProcess ( const char *  shellname = 0)

Constructor.

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

Definition at line 1110 of file tdeprocess.cpp.

◆ ~KShellProcess()

KShellProcess::~KShellProcess ( )

Destructor.

Definition at line 1116 of file tdeprocess.cpp.

Member Function Documentation

◆ quote()

TQString KShellProcess::quote ( const TQString &  arg)
static

Definition at line 1119 of file tdeprocess.cpp.

◆ start()

bool KShellProcess::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 TDEProcess 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 links 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 TDEProcess.

Definition at line 1124 of file tdeprocess.cpp.

◆ virtual_hook()

void KShellProcess::virtual_hook ( int  id,
void *  data 
)
protectedvirtual

Reimplemented from TDEProcess.

Definition at line 1129 of file tdeprocess.cpp.


The documentation for this class was generated from the following files:
  • tdeprocess.h
  • tdeprocess.cpp

tdecore

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

tdecore

Skip menu "tdecore"
  • arts
  • dcop
  • dnssd
  • interfaces
  •   kspeech
  •     interface
  •     library
  •   tdetexteditor
  • kate
  • kded
  • kdoctools
  • kimgio
  • kjs
  • libtdemid
  • libtdescreensaver
  • tdeabc
  • tdecmshell
  • tdecore
  • tdefx
  • tdehtml
  • tdeinit
  • tdeio
  •   bookmarks
  •   httpfilter
  •   kpasswdserver
  •   kssl
  •   tdefile
  •   tdeio
  •   tdeioexec
  • tdeioslave
  •   http
  • tdemdi
  •   tdemdi
  • tdenewstuff
  • tdeparts
  • tdeprint
  • tderandr
  • tderesources
  • tdespell2
  • tdesu
  • tdeui
  • tdeunittest
  • tdeutils
  • tdewallet
Generated for tdecore by doxygen 1.9.4
This website is maintained by Timothy Pearson.