mirror of
https://github.com/znc/znc.git
synced 2026-08-10 02:43:05 +02:00
Make the shell module generate error messages if fork() or pipe() fail
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1369 726aef4b-f618-498e-8847-2d620e286838
This commit is contained in:
+3
-5
@@ -292,14 +292,12 @@ public:
|
||||
m_iPid = -1;
|
||||
}
|
||||
|
||||
CExecSock(const CString& sExec) : Csock() {
|
||||
Execute(sExec);
|
||||
}
|
||||
|
||||
int Execute(const CString & sExec) {
|
||||
int iReadFD, iWriteFD;
|
||||
m_iPid = popen2(iReadFD, iWriteFD, sExec);
|
||||
ConnectFD(iReadFD, iWriteFD, "0.0.0.0:0");
|
||||
if (m_iPid != -1) {
|
||||
ConnectFD(iReadFD, iWriteFD, "0.0.0.0:0");
|
||||
}
|
||||
return(m_iPid);
|
||||
}
|
||||
void Kill(int iSignal)
|
||||
|
||||
Reference in New Issue
Block a user