Closed davidw closed 10 years ago
https://github.com/davidw/erlexec/commit/d1f03c6afb1d99c06785ac380ce0f537807c8887 is one problem, but that's not the entire story...
Now it's stopping things, but it still generates this:
=ERROR REPORT==== 28-Apr-2014::15:30:49 ===
** Generic server exec terminating
** Last message in was {port,{stop,<0.42.0>}}
** When Server state == {state,#Port<0.2547>,0,{[],[]},[],exec_mon,false}
** Reason for termination ==
** {{case_clause,[{<0.42.0>,26914}]},
[{exec,is_port_command,3,[{file,"src/exec.erl"},{line,816}]},
{exec,handle_call,3,[{file,"src/exec.erl"},{line,526}]},
{gen_server,handle_msg,5,[{file,"gen_server.erl"},{line,585}]},
{proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,239}]}]}
** exception exit: {{{case_clause,[{<0.42.0>,26914}]},
[{exec,is_port_command,3,
[{file,"src/exec.erl"},{line,816}]},
{exec,handle_call,3,[{file,"src/exec.erl"},{line,526}]},
{gen_server,handle_msg,5,
[{file,"gen_server.erl"},{line,585}]},
{proc_lib,init_p_do_apply,3,
[{file,"proc_lib.erl"},{line,239}]}]},
{gen_server,call,[exec,{port,{stop,<0.42.0>}},30000]}}
in function gen_server:call/3 (gen_server.erl, line 188)
This seems to help avoid that crash:
https://github.com/davidw/erlexec/commit/f2ff5dbc995ef63687323790e40a1c9b84f74cfd
Thanks. Could you do a pull request?
Merged.
This bash script:
Doesn't get killed by exec in a clean way.