diff options
author | Karl Berry <karl@freefriends.org> | 2019-10-11 21:35:51 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2019-10-11 21:35:51 +0000 |
commit | bb3c09cc69221c47daba9c11dc3df8be2c66b465 (patch) | |
tree | 81536069fd3f879ad242ca8041920caec2ebcb95 /Build/source/utils/asymptote/pipestream.cc | |
parent | 253f0f12cb645ea1458b36bd24f863e67406f688 (diff) |
asy 2.58
1.00 sources
git-svn-id: svn://tug.org/texlive/trunk@52346 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/utils/asymptote/pipestream.cc')
-rw-r--r-- | Build/source/utils/asymptote/pipestream.cc | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/Build/source/utils/asymptote/pipestream.cc b/Build/source/utils/asymptote/pipestream.cc index f7f3006c014..8e8abba34d7 100644 --- a/Build/source/utils/asymptote/pipestream.cc +++ b/Build/source/utils/asymptote/pipestream.cc @@ -32,6 +32,14 @@ #include "camperror.h" #include "pen.h" +iopipestream *instance; + +void pipeHandler(int) +{ + Signal(SIGPIPE,SIG_DFL); + instance->pipeclose(); +} + void iopipestream::open(const mem::vector<string> &command, const char *hint, const char *application, int out_fileno) { @@ -70,9 +78,11 @@ void iopipestream::open(const mem::vector<string> &command, const char *hint, char **argv=args(command); if(argv) execvp(argv[0],argv); execError(argv[0],hint,application); - kill(0,SIGTERM); + kill(0,SIGPIPE); _exit(-1); } + instance=this; + Signal(SIGPIPE,pipeHandler); close(out[1]); close(in[0]); *buffer=0; |