Logo

Programming-Idioms

  • Groovy
  • C#

Idiom #111 Launch other program

From current process, run program x with command-line parameters "a", "b".

using System.Diagnostics;
string[] args = { "a", "b"};
Process.Start(x, string.Join(" ", args));
#include <stdlib.h>
int system("x a b");

This spawns a shell and returns, when the child process has exited.

New implementation...
< >
programming-idioms.org