Permalink
Browse files

Exit with 111 when connection cannot be made.

  • Loading branch information...
1 parent cfdd43c commit def87342993495d55f196916732a3aade65bf6f5 @technomancy committed Oct 2, 2013
Showing with 4 additions and 4 deletions.
  1. +1 −1 grench.ml
  2. +2 −2 lein.ml
  3. +1 −1 nrepl.ml
View
2 grench.ml
@@ -22,7 +22,7 @@ let repl_port port_file =
| Some port -> int_of_string port
| None -> match Sys.file_exists filename with
| `Yes -> int_of_string (In_channel.read_all filename)
- | `No | `Unknown -> eprintf "%s%!" port_err; exit 1
+ | `No | `Unknown -> eprintf "%s%!" port_err; exit 111
let () =
if ! Sys.interactive then () else
View
4 lein.ml
@@ -4,7 +4,7 @@ open Printf
(* Invoking Leiningen tasks. *)
let port_err =
- "Couldn't read port from ~/.lein/repl-port or LEIN_REPL_PORT.\n
+ "Couldn't read port from ~/.lein/repl-port or $LEIN_REPL_PORT.\n
If Leiningen is not running, launch `lein repl :headless' from outside a
project directory and try again.\n"
@@ -16,7 +16,7 @@ let repl_port () =
| Some port -> int_of_string port
| None -> match Sys.file_exists filename with
| `Yes -> int_of_string (In_channel.read_all filename)
- | `No | `Unknown -> eprintf "%s%!" port_err; exit 1
+ | `No | `Unknown -> eprintf "%s%!" port_err; exit 111
let form = sprintf "(binding [*cwd* \"%s\", *exit-process?* false]
(System/setProperty \"leiningen.original.pwd\" \"%s\")
View
2 nrepl.ml
@@ -141,4 +141,4 @@ let new_session host port messages handler =
| Ok () -> ()
| Error _ ->
eprintf "Could not connect on port %i.\n%!" port;
- Pervasives.exit 1
+ Pervasives.exit 111

0 comments on commit def8734

Please sign in to comment.