mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-07 18:47:52 +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 since d1b2fe16
it actually caused issues.
Use execve instead, which takes a pchar as first argument and doesn't
do any further conversions
This commit is contained in:
parent
e54197e9d2
commit
305d34a8f6
@ -1583,7 +1583,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