Created
November 21, 2011 19:51
-
-
Save gleber/1383723 to your computer and use it in GitHub Desktop.
dnssd_erlang segfault
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
while true; do | |
avahi-publish -s test@b _http._tcp 7778 & | |
sleep 3s | |
killall avahi-publish | |
sleep 1s | |
killall avahi-publish | |
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-module(dnssd_crash). | |
-compile(export_all). | |
-include_lib("stdlib/include/ms_transform.hrl"). | |
t(Mod) -> | |
dbg:tracer(), | |
dbg:p(all, [call]), | |
dbg:tpl([Mod], dbg:fun2ms(fun(_) -> return_trace() end)). | |
test() -> | |
t:t(dnssd), %% without this | |
dnssd:start(), | |
spawn(fun() -> | |
dnssd:register("test@a", "_http._tcp", 7779, []), | |
dnssd:browse("_http._tcp"), | |
loop() | |
end). | |
loop() -> | |
receive | |
{dnssd, _Ref, {browse, Op, {Name, Type, Domain}}} = Msg -> | |
dnssd:resolve_sync(Name, Type, Domain), | |
loop() | |
after | |
30000 -> | |
ok | |
end. | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment