Does this look ok ?
var aArguments := new ImmutableList<String>([]);
var p := new Process();
p.Arguments := aArguments;
p.Command := '/bin/hostname';
p.RedirectOutput := true;
p.Start;
p.WaitFor;
var aStdOut := p.StandardOutput;
var aStdErr := p.StandardError;
if(p.ExitCode = 0)then
begin
var value := p.StandardOutput;
writeLn(value);
end;
With my code on darwin I get a segmentation fault when I add the redirectoutput := true.
IN the debugger it displays the output what Im assuming is the actual hostname command but it seems to hang and never gets to the check on exitcode