terminal user interface to jujutsu. Focused on speed and clarity
9
fork

Configure Feed

Select the types of activity you want to include in your feed.

wip: fix for leftover pid

+8 -9
+8 -9
jj_tui/bin/jj_process.ml
··· 115 115 (* This should ensure that all children processes are killed before we cleanup the pipes*) 116 116 Flock.join_after @@ fun () -> 117 117 let pid = 118 - Picos_io.Unix.create_process_env 119 - cmd 120 - (cmd :: args |> Array.of_list) 121 - (Unix.environment ()) 122 - stdin_o 123 - stdout_i 124 - stderr_i 118 + Picos_io.Unix.create_process_env 119 + cmd 120 + (cmd :: args |> Array.of_list) 121 + (Unix.environment ()) 122 + stdin_o 123 + stdout_i 124 + stderr_i 125 125 in 126 + let prom = Flock.fork_as_promise (fun () -> Picos_io.Unix.waitpid [] pid) in 126 127 (* Close unused pipe ends in the parent process *) 127 128 Unix.close stdout_i; 128 129 Unix.close stdin_o; ··· 133 134 let stderr_prom = read_fd_to_end stderr_o in 134 135 let stdout = Promise.await stdout_prom in 135 136 let stderr = Promise.await stderr_prom in 136 - Control.yield (); 137 - let prom = Flock.fork_as_promise (fun () -> Picos_io.Unix.waitpid [] pid) in 138 137 let code, status = Promise.await prom in 139 138 (* let stderr = read_fd_to_end stderr_i in *) 140 139 (* let stdout= ""in *)