10.12.3 Process

Haxe supports the spawning and management of new processes using the Process class, here's an example of running a git command and reading its output:

classMain {staticfunctionmain() {finalgitCommand = 'git log --format=short --no-decorate -n1 --oneline';finalprocess = new sys.io.Process(gitCommand);if (process.exitCode() != 0) {trace("Error running process command"); }finallastCommitInfo = process.stdout.readLine();trace(lastCommitInfo);process.close(); }}

close