After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 352965 - xsltproc doesn't return an error when failing to write output file
xsltproc doesn't return an error when failing to write output file
Status: RESOLVED FIXED
Product: libxslt
Classification: Platform
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: Daniel Veillard
libxml QA maintainers
Depends on:
Blocks:
 
 
Reported: 2006-08-26 10:19 UTC by Mike Hommey
Modified: 2007-01-11 19:15 UTC
See Also:
GNOME target: ---
GNOME version: Unversioned Enhancement


Attachments
Patch for the issue (5.68 KB, patch)
2006-08-26 10:44 UTC, Mike Hommey
none Details | Review

Description Mike Hommey 2006-08-26 10:19:41 UTC
Please describe the problem:
When there is a problem while writing the output file (out of space, permission denied, whatever), xsltproc doesn't return any error code.

Steps to reproduce:
1. run xsltproc -o /nonexistingdir/output.xml anxsl.xsl anxml.xml
2. echo $?


Actual results:
the value returned is 0

Expected results:
we'd expect some error code

Does this happen every time?


Other information:
I am going to attach a patch to introduce error code 11 for output error.
Comment 1 Mike Hommey 2006-08-26 10:44:24 UTC
Created attachment 71646 [details] [review]
Patch for the issue

The documentation is also updated accordlingly
Comment 2 Mike Hommey 2006-08-26 10:55:17 UTC
Note that 2 kinds of error bring an error type 9, which is "Internal processing error", but should return this new type 11 :
- set the output file to somewhere you can't create directories (like /test/test while not root ; /test gives error 11)
- some write error (out of space, etc.) when writing with the <xsl:document/> element.
Comment 3 Mike Hommey 2006-10-02 15:42:32 UTC
hello ?
Comment 4 William M. Brack 2007-01-11 19:15:28 UTC
implemented in SVN, with minor enhancements.