OCaml: Apply formatting
This commit is contained in:
parent
ce3859f62c
commit
bb1cd19000
12 changed files with 145 additions and 74 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue