Added delay to watcher
This commit is contained in:
parent
5c920823bb
commit
2f74f322ef
|
@ -6,6 +6,7 @@ start_link(SupPid, File) ->
|
||||||
gen_server:start_link(?MODULE, [SupPid, File], []).
|
gen_server:start_link(?MODULE, [SupPid, File], []).
|
||||||
|
|
||||||
init([SupPid, File]) ->
|
init([SupPid, File]) ->
|
||||||
|
timer:sleep(1000),
|
||||||
Cmd = "/usr/bin/tail -n0 --follow=name " ++ File,
|
Cmd = "/usr/bin/tail -n0 --follow=name " ++ File,
|
||||||
Port = open_port({spawn, Cmd}, [stderr_to_stdout, exit_status, binary]),
|
Port = open_port({spawn, Cmd}, [stderr_to_stdout, exit_status, binary]),
|
||||||
{ok, [SupPid, Port]}.
|
{ok, [SupPid, Port]}.
|
||||||
|
|
Loading…
Reference in New Issue
Block a user