Make CExecSock generate error messages if execvp() fails to find sh

I doubt this will ever happen, but let's better be sure...


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1362 726aef4b-f618-498e-8847-2d620e286838
This commit is contained in:
psychon
2009-02-02 15:20:44 +00:00
parent a6995ba59a
commit 422ab3288e
+3 -1
View File
@@ -550,7 +550,9 @@ int CExecSock::popen2(int & iReadFD, int & iWriteFD, const CString & sCommand) {
NULL
};
execvp("sh", (char * const *) pArgv);
exit(0);
// if execvp returns, there was an error
perror("execvp");
exit(1);
}
close(wpipes[0]);