dm_pipe_execute Function

public function dm_pipe_execute(command, output, n) result(rc)

Utility function that reads output from pipe. The output must be at least the length of the expected output + 1, due to the returned null-termination. The null character at the end will be removed.

The function returns the following error codes:

  • E_READ if pipe returned no bytes.
  • E_SYSTEM if system call failed.

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: command

Command.

character(len=*), intent(inout) :: output

Output string.

integer(kind=i8), intent(out), optional :: n

String length.

Return Value integer


Calls

proc~~dm_pipe_execute~~CallsGraph proc~dm_pipe_execute dm_pipe_execute proc~dm_is_error dm_is_error proc~dm_pipe_execute->proc~dm_is_error proc~dm_pipe_close dm_pipe_close proc~dm_pipe_execute->proc~dm_pipe_close proc~dm_pipe_open dm_pipe_open proc~dm_pipe_execute->proc~dm_pipe_open proc~dm_pipe_read dm_pipe_read proc~dm_pipe_execute->proc~dm_pipe_read c_pclose c_pclose proc~dm_pipe_close->c_pclose proc~dm_pipe_is_connected dm_pipe_is_connected proc~dm_pipe_close->proc~dm_pipe_is_connected c_popen c_popen proc~dm_pipe_open->c_popen proc~dm_f_c_string dm_f_c_string proc~dm_pipe_open->proc~dm_f_c_string proc~dm_pipe_open->proc~dm_pipe_is_connected c_fread c_fread proc~dm_pipe_read->c_fread proc~dm_pipe_read->proc~dm_pipe_is_connected

Called by

proc~~dm_pipe_execute~~CalledByGraph proc~dm_pipe_execute dm_pipe_execute proc~dm_freebsd_uptime_load_average dm_freebsd_uptime_load_average proc~dm_freebsd_uptime_load_average->proc~dm_pipe_execute proc~dm_gm_get_dimensions dm_gm_get_dimensions proc~dm_gm_get_dimensions->proc~dm_pipe_execute proc~dm_gm_get_directory dm_gm_get_directory proc~dm_gm_get_directory->proc~dm_pipe_execute proc~dm_gm_get_file_extension dm_gm_get_file_extension proc~dm_gm_get_file_extension->proc~dm_pipe_execute proc~dm_gm_get_file_format dm_gm_get_file_format proc~dm_gm_get_file_format->proc~dm_pipe_execute proc~dm_gm_get_file_name dm_gm_get_file_name proc~dm_gm_get_file_name->proc~dm_pipe_execute proc~dm_gm_get_mime dm_gm_get_mime proc~dm_gm_get_mime->proc~dm_gm_get_file_format proc~dm_system_load_average dm_system_load_average proc~dm_system_load_average->proc~dm_freebsd_uptime_load_average