13#ifndef __Process_h_Included__
14#define __Process_h_Included__
20#include <tqstringlist.h>
21#include <tqvaluelist.h>
23#include <tdelibs_export.h>
26typedef TQValueList<TQCString> QCStringList;
36class TDESU_EXPORT PtyProcess
40 virtual ~PtyProcess();
49 int exec(
const TQCString &command,
const QCStringList &args);
63 TQCString
readAll(
bool block=
true);
70 void writeLine(
const TQCString &line,
bool addNewline=
true);
77 void unreadLine(
const TQCString &line,
bool addNewline=
true);
100 int enableLocalEcho(
bool enable=
true);
116 void setEnvironment(
const QCStringList &env );
121 int fd() {
return m_Fd;}
145 static int waitMS(
int fd,
int ms);
153 static bool checkPid(pid_t pid);
163 static int checkPidExited(pid_t pid);
167 const QCStringList& environment()
const;
169 bool m_bErase, m_bTerminal;
171 TQCString m_Command, m_Exit;
175 int SetupTTY(
int fd);
178 TQCString m_Inbuf, m_TTY;
181 virtual void virtual_hook(
int id,
void* data );
183 class PtyProcessPrivate;
184 PtyProcessPrivate *d;
PTY compatibility routines.
int fd()
Returns the filedescriptor of the process.
void setErase(bool erase)
Overwrites the password as soon as it is used.
void setExitString(const TQCString &exit)
Sets the exit string.
void writeLine(const TQCString &line, bool addNewline=true)
Writes a line of text to the program's standard in.
int pid()
Returns the pid of the process.
void setTerminal(bool terminal)
Enables/disables terminal output.
TQCString readLine(bool block=true)
Reads a line from the program's standard out.
TQCString readAll(bool block=true)
Read all available output from the program's standard out.
checkPidStatus
Check process exit status for process pid.
int exec(const TQCString &command, const QCStringList &args)
Forks off and execute a command.
void unreadLine(const TQCString &line, bool addNewline=true)
Puts back a line of input.