|
1 | 1 | submodule (stdlib_system) stdlib_system_subprocess
|
2 | 2 | use iso_c_binding
|
3 | 3 | use iso_fortran_env, only: int64, real64
|
4 |
| - use stdlib_strings, only: to_c_string, join |
| 4 | + use stdlib_strings, only: to_c_char, join |
5 | 5 | use stdlib_linalg_state, only: linalg_state_type, LINALG_ERROR, linalg_error_handling
|
6 | 6 | implicit none(type, external)
|
7 | 7 |
|
@@ -284,11 +284,11 @@ subroutine launch_asynchronous(process, args, stdin)
|
284 | 284 | character(c_char), dimension(:), allocatable, target :: c_cmd,c_stdin,c_stdin_file,c_stdout_file,c_stderr_file
|
285 | 285 |
|
286 | 286 | ! Assemble C strings
|
287 |
| - c_cmd = to_c_string(join(args)) |
288 |
| - if (present(stdin)) c_stdin = to_c_string(stdin) |
289 |
| - if (allocated(process%stdin_file)) c_stdin_file = to_c_string(process%stdin_file) |
290 |
| - if (allocated(process%stdout_file)) c_stdout_file = to_c_string(process%stdout_file) |
291 |
| - if (allocated(process%stderr_file)) c_stderr_file = to_c_string(process%stderr_file) |
| 287 | + c_cmd = to_c_char(join(args)) |
| 288 | + if (present(stdin)) c_stdin = to_c_char(stdin) |
| 289 | + if (allocated(process%stdin_file)) c_stdin_file = to_c_char(process%stdin_file) |
| 290 | + if (allocated(process%stdout_file)) c_stdout_file = to_c_char(process%stdout_file) |
| 291 | + if (allocated(process%stderr_file)) c_stderr_file = to_c_char(process%stderr_file) |
292 | 292 |
|
293 | 293 | ! On Windows, this 1) creates 2) launches an external process from C.
|
294 | 294 | ! On unix, this 1) forks an external process
|
|
0 commit comments