@@ -52,6 +52,23 @@ module stdlib_system
5252 ! > Store time at the last update
5353 integer (TICKS) :: last_update = 0
5454
55+ contains
56+
57+ ! ! Check if process is still running
58+ procedure :: is_running = > process_is_running
59+
60+ ! ! Check if process is completed
61+ procedure :: is_completed = > process_is_completed
62+
63+ ! ! Return elapsed time since inception
64+ procedure :: elapsed = > process_lifetime
65+
66+ ! ! Update process state internals
67+ procedure :: update = > update_process_state
68+
69+ ! ! Kill a process
70+ procedure :: kill = > process_kill
71+
5572end type process_type
5673
5774interface runasync
@@ -142,6 +159,7 @@ module function run_sync_args(args, stdin, want_stdout, want_stderr) result(proc
142159 ! > The output process handler.
143160 type (process_type) :: process
144161 end function run_sync_args
162+
145163end interface run
146164
147165interface is_running
@@ -264,7 +282,7 @@ end subroutine wait_for_completion
264282 ! !
265283 module subroutine update_process_state (process )
266284 ! > The process object whose state needs to be updated.
267- type (process_type), intent (inout ) :: process
285+ class (process_type), intent (inout ) :: process
268286 end subroutine update_process_state
269287end interface update
270288
@@ -290,7 +308,7 @@ end subroutine update_process_state
290308 ! !
291309 module subroutine process_kill (process , success )
292310 ! > The process object to be terminated.
293- type (process_type), intent (inout ) :: process
311+ class (process_type), intent (inout ) :: process
294312 ! > Boolean flag indicating whether the termination was successful.
295313 logical , intent (out ) :: success
296314 end subroutine process_kill
0 commit comments