OCaml: Apply formatting

This commit is contained in:
Juno Takano 2025-04-19 19:09:16 -03:00
commit bb1cd19000
12 changed files with 145 additions and 74 deletions

View file

@ -1,9 +1,12 @@
let run (command: Command.command): Command.command =
let run (command : Command.command) : Command.command =
match Unix.fork () with
| 0 -> Unix.execvp command.name (Array.of_list command.arguments)
| pid -> let (_, status) = Unix.waitpid [] pid in
| pid -> (
let _, status = Unix.waitpid [] pid in
match status with
| WSTOPPED n | WSIGNALED n | WEXITED n -> { command with status = Exit n }
| WSTOPPED n | WSIGNALED n | WEXITED n ->
{ command with status = Exit n }
)
let run_many (commands: Command.command list): Command.command list =
let run_many (commands : Command.command list) : Command.command list =
List.map run commands