when I asked to not use shell, we ended with a "shell written in C", which is not good:
https://github.com/ostroproject/meta-ostro/blob/master/meta-ostro/recipes-swupd/swupd-client/files/efi_combo_updater.c
The idea is that this kind of tool can be run as a standalone binary needing as few dependencies as possible, then in a "shell-less" environment (end-goal), we do not need either busybox or toybox.
Then popen() or system() are not acceptable solutions. Almost all commands there are close to their libC alternatives, then we can replace these easily. What is left is sgdisk, but we need to figure out if can be done in pure libC without copying lots of code from sgdisk.