Hi,
I would have a very basic question regarding inets (that, BTW, I find very useful, as not involving any extra dependency): how (for example with version 28.4) are we to stop an inets “service” that we started?
I tried the following with no luck:
Eshell V16.3 (press Ctrl+G to abort, type help(). for help)
(xxx@yyy)1> inets:start().
ok
(xxx@yyy)2> {ok,Pid} = inets:start( httpd,[{profile,foo}, {port,8000}, {server_name,"bar"}, {server_root,"."}, {document_root,"."}, {bind_address,"127.0.0.1"}]).
{ok,<0.105.0>}
(xxx@yyy)3> inets:stop( httpd, Pid).
{error,not_found}
(xxx@yyy)4> inets:stop( httpd, foo).
** exception error: no function clause matching httpd:stop_service(foo) (httpd.erl:1278)
in function inets:call_service/3 (inets.erl:558)
(xxx@yyy)5> inets:stop( httpd, "bar").
** exception error: no function clause matching httpd:stop_service("bar") (httpd.erl:1278)
in function inets:call_service/3 (inets.erl:558)
(xxx@yyy)7> inets:services().
[{httpc,<0.101.0>},{httpd,<0.105.0>}]
(xxx@yyy)8> Pid.
<0.105.0>
(xxx@yyy)9> inets:services_info().
[{httpc,<0.101.0>,[{profile,default}]},
{httpd,<0.105.0>,
[{bind_address,{127,0,0,1}},
{host,"yyy"},
{port,8000},
{server_name,"bar"}]}]
In the httpd entry just above, perhaps a {profile,foo} is for some reason lacking?
Thanks in advance for any hint!
Olivier.