17 #ifndef ZNC_EXECSOCK_H 18 #define ZNC_EXECSOCK_H 20 #include <znc/zncconfig.h> 30 int iReadFD, iWriteFD;
31 m_iPid =
popen2(iReadFD, iWriteFD, sExec);
33 ConnectFD(iReadFD, iWriteFD,
"0.0.0.0:0");
38 kill(m_iPid, iSignal);
47 int popen2(
int& iReadFD,
int& iWriteFD,
const CString& sCommand);
48 void close2(
int iPid,
int iReadFD,
int iWriteFD);
54 #endif // !ZNC_EXECSOCK_H void Kill(int iSignal)
Definition: ExecSock.h:37
void Close(ECloseType eCloseType=CLT_NOW)
just mark us as closed, the parent can pick it up
virtual ~CExecSock()
Definition: ExecSock.h:41
int popen2(int &iReadFD, int &iWriteFD, const CString &sCommand)
void SetWSock(cs_sock_t iSock)
bool ConnectFD(int iReadFD, int iWriteFD, const CS_STRING &sName, bool bIsSSL=false, ETConn eDirection=INBOUND)
Tie this guy to an existing real file descriptor.
cs_sock_t & GetRSock()
returns a reference to the sock
String class that is used inside ZNC.
Definition: ZNCString.h:68
void close2(int iPid, int iReadFD, int iWriteFD)
CExecSock()
Definition: ExecSock.h:27
void SetRSock(cs_sock_t iSock)
Definition: ExecSock.h:25
int Execute(const CString &sExec)
Definition: ExecSock.h:29