mirror of
https://github.com/kiwix/libkiwix.git
synced 2026-10-24 09:59:24 -04:00
Do not add NULL at end of commandLine on Windows.
This commit is contained in:
1 parent
1787e30440
commit
bb07ff5610
7 files changed
+10
-10
No files matched your search
@@ -55,7 +55,7 @@ void* UnixImpl::waitForPID(void* _self)
|
||||
return self;
|
||||
}
|
||||
|
||||
void UnixImpl::run(const commandLine_t& commandLine)
|
||||
void UnixImpl::run(commandLine_t& commandLine)
|
||||
{
|
||||
const char* binary = commandLine[0];
|
||||
int pid = fork();
|
||||
@@ -64,6 +64,7 @@ void UnixImpl::run(const commandLine_t& commandLine)
|
||||
std::cerr << "cannot fork" << std::endl;
|
||||
break;
|
||||
case 0:
|
||||
commandLine.push_back(NULL);
|
||||
if (execvp(binary, const_cast<char* const*>(commandLine.data()))) {
|
||||
perror("Cannot launch\n");
|
||||
exit(-1);
|
||||
|
||||
Reference in new issue
Block a user