From 81aeb136c7deaf913b0fe9040425ddc6aaf3c447 Mon Sep 17 00:00:00 2001 From: Akira Kakuto Date: Mon, 17 Jul 2017 21:29:45 +0000 Subject: xetex.ch: Set a non-zero exit code if the pipe to the output driver is closed with a non-zero code (from Jonathan) git-svn-id: svn://tug.org/texlive/trunk@44834 c570f23f-e606-0410-a88d-b1316a301751 --- Build/source/texk/web2c/xetexdir/ChangeLog | 5 +++++ Build/source/texk/web2c/xetexdir/xetex.ch | 22 ++++++++++++++++++++++ 2 files changed, 27 insertions(+) (limited to 'Build/source') diff --git a/Build/source/texk/web2c/xetexdir/ChangeLog b/Build/source/texk/web2c/xetexdir/ChangeLog index 809ab0bfca1..18c4be0866d 100644 --- a/Build/source/texk/web2c/xetexdir/ChangeLog +++ b/Build/source/texk/web2c/xetexdir/ChangeLog @@ -1,3 +1,8 @@ +2017-07-17 Jonathan Kew + + * xetex.ch: Set a non-zero exit code if the pipe + to the output driver closes with a non-zero code. + 2017-04-27 Karl Berry * am/xetex.am (xetex_ldadd): add $(ICU_LIBS_EXTRA). diff --git a/Build/source/texk/web2c/xetexdir/xetex.ch b/Build/source/texk/web2c/xetexdir/xetex.ch index c0b1f9f0a04..0eb481a91a1 100644 --- a/Build/source/texk/web2c/xetexdir/xetex.ch +++ b/Build/source/texk/web2c/xetexdir/xetex.ch @@ -122,6 +122,27 @@ if translate_filename then begin wterm_ln('" ignored)'); @z +@x We add a new |history| value for failure of the output driver +has been detected. It has four possible values: |spotless|, |warning_issued|, +|error_message_issued|, and |fatal_error_stop|. +@y +has been detected. It has five possible values: |spotless|, |warning_issued|, +|error_message_issued|, |fatal_error_stop|, and |output_failure|. +@z + +@x +@d fatal_error_stop=3 {|history| value when termination was premature} +@y +@d fatal_error_stop=3 {|history| value when termination was premature} +@d output_failure=4 {|history| value when output driver returned an error} +@z + +@x +@!history:spotless..fatal_error_stop; {has the source input been clean so far?} +@y +@!history:spotless..output_failure; {has the source input been clean so far?} +@z + @x [6.84] l.1904 - Implement the switch-to-editor option. begin edit_name_start:=str_start[edit_file.name_field]; edit_name_length:=str_start[edit_file.name_field+1] - @@ -532,6 +553,7 @@ if list_ptr(p)=null then begin else print("driver return code"); print(") generating output;"); print_nl("file "); print(output_file_name); print(" may not be valid."); + history:=output_failure; end; @z -- cgit v1.2.3