Compare commits
No commits in common. "bc190bd0547566996d11d6be3de86fa794f82fa8" and "b7d18b77459f535f1078abff4e52ea76ddd9c011" have entirely different histories.
bc190bd054
...
b7d18b7745
2 changed files with 18 additions and 0 deletions
|
@ -17,6 +17,15 @@
|
||||||
(locks p9418)
|
(locks p9418)
|
||||||
(deps %{bin:mgit}))
|
(deps %{bin:mgit}))
|
||||||
|
|
||||||
|
(executable
|
||||||
|
(name git_daemon_exists)
|
||||||
|
(libraries unix))
|
||||||
|
|
||||||
|
(rule
|
||||||
|
(with-stdout-to
|
||||||
|
git-daemon
|
||||||
|
(run ./git_daemon_exists.exe)))
|
||||||
|
|
||||||
(test
|
(test
|
||||||
(name tests)
|
(name tests)
|
||||||
(libraries git-kv alcotest bos mirage-clock-unix lwt.unix git-unix)
|
(libraries git-kv alcotest bos mirage-clock-unix lwt.unix git-unix)
|
||||||
|
|
9
test/git_daemon_exists.ml
Normal file
9
test/git_daemon_exists.ml
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
let git_daemon_exists () =
|
||||||
|
match Unix.create_process "git" [| "git"; "daemon" |] Unix.stdin Unix.stdout Unix.stderr with
|
||||||
|
| pid ->
|
||||||
|
Unix.kill pid Sys.sigint ; true
|
||||||
|
| exception Unix.Unix_error _ -> false
|
||||||
|
|
||||||
|
let () =
|
||||||
|
let v = git_daemon_exists () in
|
||||||
|
Format.printf "%b" v
|
Loading…
Reference in a new issue