GPGME features an internal subsystem to run the actual backend engines. Along with data abstraction object this subsystem can be used to run arbitrary simple programs which even need not be related to cryptographic features. It may for example be used to run tools which are part of the GnuPG system but are not directly accessible with the GPGME API.
gpgme_op_spawn runs the program file with
the arguments taken from the NULL terminated array argv. If no
arguments are required argv may be given as
NULL. In the
latter case or if
argv is the empty string, GPGME uses the
basename of file for
argv. The file descriptors
stderr are connected to the
data objects datain, dataout, and dataerr. If NULL
is passed for one of these data objects the corresponding file
descriptor is connected to /dev/null.
The value in flags is a bitwise-or combination of one or multiple of the following bit values:
Under Windows this flag inhibits the allocation of a new console for the program. This is useful for a GUI application which needs to call a command line helper tool.
Under Windows this flag allows the called program to put itself into the foreground.
This is the asynchronous variant of