Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Add yaws:hup/0 to allow Yaws reloads from another erlang module

  • Loading branch information...
commit 26badd68b8eddb97a215597d8a36900cf4c875ce 1 parent 6e2a971
@capflam capflam authored
Showing with 5 additions and 2 deletions.
  1. +5 −2 src/yaws.erl
View
7 src/yaws.erl
@@ -14,7 +14,7 @@
-include("yaws_debug.hrl").
-include_lib("kernel/include/file.hrl").
--export([start/0, stop/0, hup/1, restart/0, modules/0, load/0]).
+-export([start/0, stop/0, hup/0, hup/1, restart/0, modules/0, load/0]).
-export([start_embedded/1, start_embedded/2, start_embedded/3, start_embedded/4,
add_server/2, create_gconf/2, create_sconf/2, setup_sconf/2]).
@@ -662,6 +662,9 @@ lkup(Key, List, Def) ->
+hup() ->
+ dohup(undefined).
+
hup(Sock) ->
spawn(fun() ->
group_leader(whereis(user), self()),
@@ -681,7 +684,7 @@ dohup(Sock) ->
yaws_log:rotate(Res),
case Sock of
undefined ->
- ok;
+ {yaws_hupped, Res};
_ ->
gen_tcp:send(Sock, io_lib:format("hupped: ~p~n", [Res])),
gen_tcp:close(Sock)
Please sign in to comment.
Something went wrong with that request. Please try again.