mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-17 09:59:41 +02:00
Darwin: fix make cycle
unix.fpexecv takes a rawbytestring as first parameter, so inside the child it was converting the pchar back to an ansistring and also converting it to the OS file system code page. Since Darwin uses vfork/execv in SysUtils.Executeprocess, this could result in (exception)stack corruption and for some reason only sinced1b2fe16
it actually caused issues. Use execve instead, which takes a pchar as first argument and doesn't do any further conversions (cherry picked from commit305d34a8f6
)
This commit is contained in:
parent
05480071e2
commit
cd83438cb0
@ -1408,7 +1408,7 @@ Begin
|
||||
if pid=0 then
|
||||
begin
|
||||
{The child does the actual exec, and then exits}
|
||||
fpexecv(pchar(pointer(LPath)),Cmdline2);
|
||||
fpexecve(pchar(pointer(LPath)),Cmdline2,envp);
|
||||
{ If the execve fails, we return an exitvalue of 127, to let it be known}
|
||||
fpExit(127);
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user