mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
Linux: Fix Process::openDocument() return value in previous commit
This commit is contained in:
parent
6cd0ebd832
commit
6d4fa280c6
1 changed files with 6 additions and 4 deletions
|
|
@ -209,16 +209,18 @@ bool Process::openDocument (const String& fileName, const String& parameters)
|
|||
|
||||
const char* const argv[4] = { "/bin/sh", "-c", cmdString.toUTF8(), 0 };
|
||||
|
||||
if (fork() == 0)
|
||||
auto cpid = fork();
|
||||
|
||||
if (cpid == 0)
|
||||
{
|
||||
setsid();
|
||||
|
||||
// Child process
|
||||
execve (argv[0], (char**) argv, environ);
|
||||
exit (0);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
return cpid >= 0;
|
||||
}
|
||||
|
||||
void File::revealToUser() const
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue