public static int __gnat_portable_no_block_spawn(Byte[] filename, mgnat.adalib.standard.ada_string[] Args, int fd, bool stderr_to_out) { MyProcess process = new MyProcess(); #if !COMPACT System.IO.TextWriter stream = getWriter(fd); if (stream != null) { process.RedirectOutput(stream, stderr_to_out); } #endif return(process.Spawn(filename, Args, true)); }
public static int __gnat_portable_spawn(Byte[] filename, mgnat.adalib.standard.ada_string[] Args, int fd, bool stderr_to_out) { MyProcess process = new MyProcess(); #if !COMPACT System.IO.TextWriter stream = getWriter(fd); if (stream != null) { process.RedirectOutput(stream, stderr_to_out); } #endif int ret = process.Spawn(filename, Args, false); if (ret != -1) { int ExitCode = -1; process.WaitForExit(); ExitCode = process.ExitCode; process.Close(); return(ExitCode); } process.Close(); return(ret); }