4 ms·
This article is nonsense. In libguestfs[1] we invoke shell commands for many filesystem utilities ... from C which (if you believe the article) would be the wo
by rwmj 15y ago
This article is nonsense. In libguestfs[1] we invoke shell commands for many filesystem utilities ... from C which (if you believe the article) would be the worst place to do this.
All of the problems are avoided by having a smart way to run external commands and capture their errors. See the functions [2] and examples of use [3] [4].
[1] http://libguestfs.org http://libguestfs.org
[2] https://github.com/libguestfs/libguestfs/blob/d0cf52b9118ab18bfffc7e4397531192610a7371/daemon/daemon.h#L59 https://github.com/libguestfs/libguestfs/blob/d0cf52b9118ab1...
[3] https://github.com/libguestfs/libguestfs/blob/d0cf52b9118ab18bfffc7e4397531192610a7371/daemon/mkfs.c#L36 https://github.com/libguestfs/libguestfs/blob/d0cf52b9118ab1...
[4] https://github.com/libguestfs/libguestfs/blob/d0cf52b9118ab18bfffc7e4397531192610a7371/daemon/ext2.c#L359 https://github.com/libguestfs/libguestfs/blob/d0cf52b9118ab1...
- hesselink 15y agoWhy is it nonsense? It's arguing exactly for your solution: a smart way to run external commands and capture their errors.