Exit code for DCMTK tools (dcm2xml, dsr2xml, etc.)

All other questions regarding DCMTK

Moderator: Moderator Team

Post Reply
Message
Author
nikkoara
Posts: 18
Joined: Wed, 2014-02-19, 14:31

Exit code for DCMTK tools (dcm2xml, dsr2xml, etc.)

#1 Post by nikkoara »

I got bit by assuming that any error encountered would result in a non-zero exit code. It turns out that is no the case at least for dcm2xml and dsr2xml, i.e., the following prints success:

Code: Select all

$ ./bin/dsr2xml /dev/null && echo success
F: dsr2xml: error (End of stream) reading file: /dev/null
success
Is this by design or by accident?

Thanks!

J. Riesmeier
DCMTK Developer
Posts: 2503
Joined: Tue, 2011-05-03, 14:38
Location: Oldenburg, Germany
Contact:

Re: Exit code for DCMTK tools (dcm2xml, dsr2xml, etc.)

#2 Post by J. Riesmeier »

By accident. Thank you for the report. I'll fix it for dcm2xml and dsr2xml.

Any other tool where you've found this (mis)behavior?

nikkoara
Posts: 18
Joined: Wed, 2014-02-19, 14:31

Re: Exit code for DCMTK tools (dcm2xml, dsr2xml, etc.)

#3 Post by nikkoara »

No, these are the only two I know of. I took a cursory look at the other dcmdata tools, they seem to be fine.

J. Riesmeier
DCMTK Developer
Posts: 2503
Joined: Tue, 2011-05-03, 14:38
Location: Oldenburg, Germany
Contact:

Re: Exit code for DCMTK tools (dcm2xml, dsr2xml, etc.)

#4 Post by J. Riesmeier »


Post Reply

Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 1 guest