mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-29 16:01:38 +00:00
only exec if chdir worked
This commit is contained in:
parent
339fb7a131
commit
e20b3d59fc
1 changed files with 5 additions and 1 deletions
|
@ -1733,7 +1733,11 @@ GSPrivateCheckTasks()
|
|||
(void) close(i);
|
||||
}
|
||||
|
||||
(void)chdir(path);
|
||||
if (0 != chdir(path))
|
||||
{
|
||||
exit(-1);
|
||||
}
|
||||
|
||||
(void)execve(executable, (char**)args, (char**)envl);
|
||||
exit(-1);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue