diff options
author | Karl Berry <karl@freefriends.org> | 2009-07-15 00:14:18 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2009-07-15 00:14:18 +0000 |
commit | e355922861e2bc91176c058d563d477444c2dfd9 (patch) | |
tree | b8b23e9b69d8a1cbd97d0063bf48d51237e6499a /Build/source/utils/asymptote/pipestream.h | |
parent | c64b34678b096f795ef6e745e23cf50cc4e983ea (diff) |
asymptote 1.81 source/w32 update
git-svn-id: svn://tug.org/texlive/trunk@14262 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/utils/asymptote/pipestream.h')
-rw-r--r-- | Build/source/utils/asymptote/pipestream.h | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/Build/source/utils/asymptote/pipestream.h b/Build/source/utils/asymptote/pipestream.h index e0546f61a63..fa1fd1dd8ed 100644 --- a/Build/source/utils/asymptote/pipestream.h +++ b/Build/source/utils/asymptote/pipestream.h @@ -61,24 +61,27 @@ public: return transcript.str(); } - void open(const char *command, const char *hint=NULL, + void open(const mem::vector<string> &command, const char *hint=NULL, const char *application="", int out_fileno=STDOUT_FILENO) { if(pipe(in) == -1) { ostringstream buf; - buf << "in pipe failed: " << command << endl; + buf << "in pipe failed: "; + for(size_t i=0; i < command.size(); ++i) buf << command[i]; camp::reportError(buf); } if(pipe(out) == -1) { ostringstream buf; - buf << "out pipe failed: " << command << endl; + buf << "out pipe failed: "; + for(size_t i=0; i < command.size(); ++i) buf << command[i]; camp::reportError(buf); } cout.flush(); // Flush stdout to avoid duplicate output. if((pid=fork()) < 0) { ostringstream buf; - buf << "fork failed: " << command << endl; + buf << "fork failed: "; + for(size_t i=0; i < command.size(); ++i) buf << command[i]; camp::reportError(buf); } @@ -94,7 +97,7 @@ public: close(out[1]); char **argv=args(command); if(argv) execvp(argv[0],argv); - execError(command,hint,application); + execError(argv[0],hint,application); kill(0,SIGTERM); _exit(-1); } @@ -120,7 +123,7 @@ public: iopipestream(): pid(0), pipeopen(false) {} - iopipestream(const char *command, const char *hint=NULL, + iopipestream(const mem::vector<string> &command, const char *hint=NULL, const char *application="", int out_fileno=STDOUT_FILENO) : pid(0), pipeopen(false) { open(command,hint,application,out_fileno); |