From f1634dbaeadc4453ce2b797e89e487be51370200 Mon Sep 17 00:00:00 2001 From: Joe Orton Date: Wed, 13 May 2020 08:36:56 +0100 Subject: [PATCH] Update xmlwf to exit with 3 if an output file could not be opened. Update xmlwf exit code docs per review. --- expat/doc/xmlwf.xml | 7 ++++++- expat/xmlwf/xmlwf.c | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/expat/doc/xmlwf.xml b/expat/doc/xmlwf.xml index b1ebd003..654466ce 100644 --- a/expat/doc/xmlwf.xml +++ b/expat/doc/xmlwf.xml @@ -388,7 +388,7 @@ supports both. EXIT STATUS - The following exit status codes are returned: + For option or , &dhpackage; always exits with status code 0. For other cases, the following exit status codes are returned: @@ -405,6 +405,11 @@ supports both. An input file was not well-formed or could not be parsed. + + + If using the option, an error occurred opening an output file. + + diff --git a/expat/xmlwf/xmlwf.c b/expat/xmlwf/xmlwf.c index fa3c89a8..87fac3b1 100644 --- a/expat/xmlwf/xmlwf.c +++ b/expat/xmlwf/xmlwf.c @@ -1057,7 +1057,7 @@ tmain(int argc, XML_Char **argv) { userData.fp = tfopen(outName, T("wb")); if (! userData.fp) { tperror(outName); - exit(1); + exit(3); } setvbuf(userData.fp, NULL, _IOFBF, 16384); #ifdef XML_UNICODE