+ // stdout:
+ if (!this.cfg.async) {
+ string ls_stdout;
+ string ls_stderr;
+ int ls_status;
+
+ Process.spawn_sync (
+ this.cfg.cwd,
+ this.cfg.args,
+ this.cfg.env,
+ SpawnFlags.SEARCH_PATH,
+ null,
+ out ls_stdout,
+ out ls_stderr,
+ out ls_status
+ );
+ this.output = ls_stdout;
+ this.stderr = ls_stderr;
+ this.result = ls_status;
+ if (this.cfg.exceptions && this.result != 0) {
+ var errstr = string.joinv(" ", this.cfg.args) + "\n";
+ errstr += this.output;
+ errstr += this.output.length > 0 ? "\n" : "";
+ errstr += this.stderr;
+ //print("Throwing execute error:%s\n", errstr);
+ throw new SpawnError.EXECUTE_ERROR(errstr);
+ //this.toString = function() { return this.stderr; };
+ ///throw new Exception this; // we throw self...
+ }
+ return;
+
+ }
+
+
+
+