call POSIX popen(3c) routine from Fortran

Find us on…

GitHub

M_process

M_process.f90 and associated files

process

Name

M_process - read and write lines to or from a process from Fortran via a C wrapper

Description

The M_process Fortran module ( A fortran-lang.org package ) reads and writes from processes by calling the C popen(3c) procedure.

NB. These procedures require a platform that supports POSIX routines and the popen(3c) procedure in particular.

Download and Build using make(1)GNU

Just download the github repository, enter the src/ directory and run make:

     git clone https://github.com/urbanjost/M_process.git
     cd M_process/src

     # change Makefile if not using one of the listed compilers

     # for gfortran
     make clean
     make F90=gfortran gfortran

     # for ifort
     make clean
     make F90=ifort ifort

     # for nvfortran
     make clean
     make F90=nvfortran nvfortran

     # optionally
     make test               # run the unit tests (needs M_framework(3f) module)
     make run  --example "*" # run all the demo programs from the man-pages
     make help               # see other developer options

This will compile the M_process module and optionally build all the example programs from the document pages in the example/ sub-directory and run the unit tests.

Supports FPM fpm

(registered at the fpm(1) registry )

Alternatively, download the github repository and build it with fpm ( as described at Fortran Package Manager )

     git clone https://github.com/urbanjost/M_process.git
     cd M_process
     fpm build
     fpm test

or just list it as a dependency in your fpm.toml project file.

     [dependencies]
     M_process        = { git = "https://github.com/urbanjost/M_process.git" }

Demo Programsdemos

The man-pages contain small sample programs that have been extracted and placed in the example/ directory.

Documentation docs

User

There are currently several different ways to view the documentation …

and there are man-pages in the distribution in + manpages.tgz or + manpages.zip + CHANGELOG provides a history of significant changes

Developer

Alternatives

The Fortran Wiki fortranwiki.org contains information on other libraries and modules that provide access to processes and threads.


Developer Info

John S. Urban

Modules

Derived Types