1 /**
2 * Copyright: Copyright (c) 2009-2011 Jacob Carlborg. All rights reserved.
3 * Authors: Jacob Carlborg
4 * Version: Initial created: Feb 21, 2009
5 * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost Software License 1.0)
6 */7 moduledvm.sys.Process;
8 9 importtango.sys.Process;
10 11 /// Copies environment to new process.12 /// Waits for process to finish.13 /// Params: 'args' is same as in tango.sys.Process.new(true, char[][] args...)14 /// Returns: Process.Result (containing status code and reason the process ended)15 Process.Resultsystem(string[] args...)
16 {
17 Processp;
18 autoresult = system(p, args);
19 p.close;
20 returnresult;
21 }
22 23 /// Has extra param to retreive the Process object used so you can obtain extra information.24 /// Make sure to call p.close() when you're done with it.25 Process.Resultsystem(outProcessp, string[] args...)
26 {
27 p = newProcess(true, args);
28 p.redirect = Redirect.None;
29 p.execute();
30 autoresult = p.wait();
31 returnresult;
32 }