Isn't parallel operation of syscmd already available via the shell's & operator?
Doug On Fri, Sep 19, 2025 at 9:12 AM Eric Blake <[email protected]> wrote: > > On Thu, Sep 18, 2025 at 06:37:38PM -0300, Bento Borges Schirmer wrote: > > Hey, > > > > I don't really know how m4 works. That's just an idea that occurred to > > me. I think m4 could keep expanding macros and processing text while a > > syscmd() is in flight, potentially having several syscmd() executing > > at once. The user would have to guarantee that the syscmd() execution > > is "pure", that is, that one command does not depend on side effects > > of previous executions. All that could be enabled by some flag, like > > -j which reminisces Makefile. > > You are welcome to try and write such a patch. But currently m4 is > single-threaded; what you are proposing would be a massive redesign, > in order to handle parallel threads and possible speculative execution > followed by rollback if the syscmd was not pure after all. > > -- > Eric Blake, Principal Software Engineer > Red Hat, Inc. > Virtualization: qemu.org | libguestfs.org > >
