Closed Lol4t0 closed 9 years ago
Maybe this is due to fdlink port dependency in sh https://github.com/synrc/sh/blob/master/src/sh.erl#L4 which includes fdlink in c_src already.
Well, I mean
Args = [find_executable(), "-m", "-e", "close_write", "-e", "moved_to", "-e", "create", "-r", Path1],
erlang:open_port({spawn_executable, sh:fdlink_executable()},
[stream, exit_status, {line, 16384}, {args, Args}, {cd, Cwd}]).
crashed with exit code 1
and
Args = ["-m", "-e", "close_write", "-e", "moved_to", "-e", "create", "-r", Path1],
erlang:open_port({spawn_executable,find_executable()},
[stream, exit_status, {line, 16384}, {args, Args}, {cd, Cwd}]).
works as intended.
I investigated a bit. Looks like erlang can't launch applications on the relative path on my system. If I replace
fdlink_executable() -> filename:join(code:priv_dir(sh), "fdlink").
with
fdlink_executable() -> filename:absname(filename:join(code:priv_dir(sh), "fdlink")).
in sh project (https://github.com/synrc/sh/blob/master/src/sh.erl#L4), fs starts working correctly
Could you please make a fix
Yeah. Thanks. This way it workds. But don't forget to update tags for fs
in rebar.config
.
Fixed.
I have 2 dev machines with Ubuntu 14.04. On the both
inotifywait
launched throughfdlink
crashes on start with the message{port_exit, 1}
. Though it works when launched directly.