>> executing out-of-process tools and parsing their output is not acceptable in libraries. Ever
> I strongly disagree with this statement. Doing work out-of-process gives robustness (and sometimes security) guarantees that are just not possible with calls into libraries.
But then you rely on parsing tool's output - worst thing to rely ever. This is not to mention that you rely on ability to start an external program - that is, you make *a lot* of assumptions (about filesystems mounted and their layout, etc).