24 #ifndef __EDELIB_PTYPROCESS_H__
25 #define __EDELIB_PTYPROCESS_H__
27 #include "edelib-global.h"
28 #include <sys/types.h>
45 int setup_tty(
int fd);
48 char *m_Inbuf, *m_TTY;
50 class PtyProcessPrivate;
56 char **environment()
const;
58 bool m_bErase, m_bTerminal;
60 char *m_Command, *m_Exit;
81 int exec(
const char *command,
const char **args);
89 char *read_line(
bool block=
true);
96 void write_line(
const char *line,
bool addNewline=
true);
103 void unread_line(
const char *line,
bool addNewline=
true);
114 int wait_for_child();
126 int enable_local_echo(
bool enable=
true);
142 void set_environment(
const char **env );
147 inline int fd()
const {
return m_Fd; }
152 inline int pid()
const {
return m_Pid; }
157 void terminate_child();
168 static int wait_ms(
int fd,
int ms);
174 static bool check_pid(pid_t pid);
191 static int check_pid_exited(pid_t pid);
emulate pty api
Definition: Pty.h:38
CheckPidStatus
Definition: PtyProcess.h:182
void set_exit_string(char *exit)
Definition: PtyProcess.h:109
void set_terminal(bool terminal)
Definition: PtyProcess.h:131
int fd() const
Definition: PtyProcess.h:147
#define E_DISABLE_CLASS_COPY(klass)
Definition: edelib-global.h:161
int pid() const
Definition: PtyProcess.h:152
void set_erase(bool erase)
Definition: PtyProcess.h:137
Synchronous communication with tty programs.
Definition: PtyProcess.h:42