KDE3Support
Go to the documentation of this file.
25 #include <QtCore/QObject>
27 #include <sys/types.h>
32 class QSocketNotifier;
33 class K3ProcessPrivate;
160 Q_DECLARE_FLAGS(Communication, CommunicationFlag)
238 void clearArguments();
266 virtual bool start(RunMode runmode = NotifyOnExit,
267 Communication comm = NoCommunication);
275 virtual bool kill(
int signo = SIGTERM);
281 bool isRunning()
const;
312 bool wait(
int timeout = -1);
320 bool normalExit()
const;
328 bool signalled()
const;
337 bool coreDumped()
const;
345 int exitStatus()
const;
353 int exitSignal()
const;
385 bool writeStdin(
const char *buffer,
int buflen);
446 void setRunPrivileged(
bool keepPrivileges);
453 bool runPrivileged()
const;
461 void setEnvironment(
const QString &name,
const QString &value);
469 void setWorkingDirectory(
const QString &dir);
486 void setUseShell(
bool useShell,
const char *shell = 0);
496 static QString quote(
const QString &arg);
517 void setUsePty(Communication comm,
bool addUtmp);
530 enum { PrioLowest = 20, PrioLow = 10, PrioLower = 5, PrioNormal = 0,
531 PrioHigher = -5, PrioHigh = -10, PrioHighest = -19 };
538 bool setPriority(
int prio);
568 void receivedStdout(
K3Process *proc,
char *buffer,
int buflen);
588 void receivedStdout(
int fd,
int &len);
605 void receivedStderr(
K3Process *proc,
char *buffer,
int buflen);
623 void slotChildOutput(
int fdno);
630 void slotChildError(
int fdno);
638 void slotSendData(
int dummy);
646 void setupEnvironment();
704 virtual int setupCommunication(Communication comm);
718 virtual int commSetupDoneP();
725 virtual int commSetupDoneC();
734 virtual void processHasExited(
int state);
761 virtual void commClose();
776 void setBinaryExecutable(
const char *filename);
815 int childOutput(
int fdno);
822 int childError(
int fdno);
844 K3ProcessPrivate*
const d;
847 Q_DECLARE_OPERATORS_FOR_FLAGS(K3Process::Communication)
849 class K3ShellProcessPrivate;
879 Communication comm = NoCommunication);
881 static QString
quote(
const QString &arg);
884 K3ShellProcessPrivate*
const d;
int input_total
The total length of input_data.
int status
The process' exit status as returned by waitpid().
QList< QByteArray > arguments
The list of the process' command line arguments.
QSocketNotifier * errnot
The socket notifier for err[0].
bool runs
true if the process is currently running.
@ DontCare
The application does not receive notifications from the subprocess when it is finished or aborted.
Communication communication
Lists the communication links that are activated for the child process.
const QList< QByteArray > & args()
Lets you see what your arguments are for debugging.
@ Block
The application is suspended until the started process is finished.
@ NotifyOnExit
The application is notified when the subprocess dies.
CommunicationFlag
Modes in which the communication channels can be opened.
int input_sent
The number of bytes already transmitted.
RunMode
Run-modes for a child process.
const char * input_data
The buffer holding the data that has to be sent to the child.
A class derived from K3Process to start child processes through a shell.
virtual bool start(RunMode runmode=NotifyOnExit, Communication comm=NoCommunication)
Starts the process.
static QString quote(const QString &arg)
This function can be used to quote an argument string such that the shell processes it properly.
Used internally by K3Process.
RunMode run_mode
How to run the process (Block, NotifyOnExit, DontCare).
QSocketNotifier * innot
The socket notifier for in[1].
pid_t pid_
The PID of the currently running process.
QSocketNotifier * outnot
The socket notifier for out[0].
QDebug operator<<(QDebug s, const KDateTime &time)
bool keepPrivs
If false, the child process' effective uid & gid will be reset to the real values.
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Sun Jan 19 2020 00:00:00 by
doxygen 1.8.17 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.