13 #ifndef __Process_h_Included__
14 #define __Process_h_Included__
16 #include <sys/types.h>
18 #include <tqcstring.h>
20 #include <tqstringlist.h>
21 #include <tqvaluelist.h>
23 #include <tdelibs_export.h>
26 typedef TQValueList<TQCString> QCStringList;
49 int exec(
const TQCString &command,
const QCStringList &args);
57 TQCString readLine(
bool block=
true);
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 pid()
Returns the pid 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 setTerminal(bool terminal)
Enables/disables terminal output.
checkPidStatus
Check process exit status for process pid.
Synchronous communication with tty programs.
int fd()
Returns the filedescriptor of the process.