Skip to content

Commit

Permalink
Log to stderr if a monitor lock file exists
Browse files Browse the repository at this point in the history
Reviewed By: ljw1004

Differential Revision: D34771406

fbshipit-source-id: 41f3ef0513c6ccb9c92c2cebced19aa87e88b029
  • Loading branch information
Wilfred authored and facebook-github-bot committed Mar 10, 2022
1 parent 1d29718 commit 529e554
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion hphp/hack/src/server/hhServerMonitor.ml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,10 @@ let monitor_daemon_main
and handle requests. *)
(if not (ServerArgs.check_mode options) then
let lock_file = ServerFiles.lock_file www_root in
if not (Lock.grab lock_file) then Exit.exit Exit_status.No_error);
if not (Lock.grab lock_file) then (
Printf.eprintf "Monitor lock file already exists: %s\n%!" lock_file;
Exit.exit Exit_status.No_error
));

(* Daemon mode (should_detach): --daemon means the caller already spawned
us in a new process, and it's now our responsibility to establish a logfile
Expand Down

0 comments on commit 529e554

Please sign in to comment.