A simple module for popen
.
initiate pipe streams to or from a process
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(kind=c_char, len=1), | dimension(*) | :: | command | |||
character(kind=c_char, len=1), | dimension(*) | :: | mode |
get a string from a stream
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(kind=c_char, len=1), | dimension(*) | :: | s | |||
integer(kind=c_int), | value | :: | siz | |||
type(c_ptr), | value | :: | stream |
close a pipe stream to or from a process
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(c_ptr), | value | :: | stream |
Convert a C string to a Fortran string.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(in) | :: | c |
C string |
Fortran string
Return the result of the command as a string.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(in) | :: | command |
the command to run |
the result of that command