LWN.net Logo

libabc: a demonstration library for kernel developers

libabc: a demonstration library for kernel developers

Posted Nov 2, 2011 20:43 UTC (Wed) by RCL (guest, #63264)
In reply to: libabc: a demonstration library for kernel developers by quotemstr
Parent article: libabc: a demonstration library for kernel developers

>> 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).


(Log in to post comments)

libabc: a demonstration library for kernel developers

Posted Nov 3, 2011 21:54 UTC (Thu) by nix (subscriber, #2304) [Link]

It's quite all right to rely on parsing a tool's output if you control the tool as well. (Although in this case you should probably provide a library interface to it as well as one that requires exec()ing something, this is not always practical nor possible.)

Copyright © 2013, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds