console fifos in separate directory
This commit is contained in:
parent
133884faf4
commit
4c5a795a3b
|
@ -51,7 +51,7 @@ let read_console name ring channel () =
|
|||
Lwt_io.close channel)
|
||||
|
||||
let open_fifo name =
|
||||
let fifo = Fpath.(Vmm_core.tmpdir / name + "fifo") in
|
||||
let fifo = Fpath.(Vmm_core.tmpdir / "fifo" / name) in
|
||||
Lwt.catch (fun () ->
|
||||
Logs.debug (fun m -> m "opening %a for reading" Fpath.pp fifo) ;
|
||||
Lwt_io.open_file ~mode:Lwt_io.Input (Fpath.to_string fifo) >>= fun channel ->
|
||||
|
|
|
@ -59,7 +59,7 @@ let rec mkfifo name =
|
|||
|
||||
let image_file, fifo_file =
|
||||
((fun vm -> Fpath.(tmpdir / (vm_id vm) + "img")),
|
||||
(fun vm -> Fpath.(tmpdir / (vm_id vm) + "fifo")))
|
||||
(fun vm -> Fpath.(tmpdir / "fifo" / (vm_id vm))))
|
||||
|
||||
let rec fifo_exists file =
|
||||
try Ok (Unix.((stat @@ Fpath.to_string file).st_kind = S_FIFO)) with
|
||||
|
|
Loading…
Reference in a new issue