Description
Motivation
Spawning or forking synchronous and asynchronous processes in an Fortran application is currently not easily doable in a cross-platform way. This is usually required for job servers which cannot access a functionality from a dynamically loaded library but have to access this functionality by other means, e.g. invoking a program with some input (standard input, files or arguments) and processing its output (standard output or files). Redesigning the functionality to allow dynamically loading symbols is not always possible or desirable.
A current alternative is the execute_command_line
which allows to create a new shell or CMD instance, which in turn can invoke commands. Together with OpenMP, MPI or coarrays this can be done even asynchronous but is tedious and somewhat errorprone. Using a shell or CMD instance has some security and speed implications as well.
Possible API
- procedural API similar to POSIX API (basically thin
iso_c_binding
wrapper) - object oriented API similar to Python's
subprocess
module
Available Implementations
Feel free to add entries to this list.
For POSIX API:
For Windows API?