Match Specifications

Francesco Cesarini francesco@REDACTED
Wed Oct 24 12:36:54 CEST 2001


Hi!
I got stuck with match specifications and wonder if anyone can find the
error or confirm if it is a bug.. When the match specification is
successful, I want to enable the tracing of all process related
activities, but the flags do not seem to get activated. Other actions
(Even if I have not tried all) seem to work ok. Here is the problem
stripped to a bare minimum:

3> P = ping:start().
<0.37.0>
4> erlang:trace(P, true, [call]).
1
5> erlang:trace_pattern({ping,'_','_'}, [{[],[],[{enable_trace,
[procs]}]}],[local]).
5
6> ping:send(P).
pong
7> flush().
Shell got {trace,<0.37.0>,call,{ping,loop,[]}}
ok
8> erlang:trace_info(P, flags).
{flags,[call]}
9> ping:send(P).
pong
10> flush().
Shell got {trace,<0.37.0>,call,{ping,loop,[]}}
ok

-module(ping).
-export([start/0, send/1, loop/0]).

start() ->
    spawn(ping, loop, []).

send(Pid) ->
    Pid ! {self(), ping},
    receive
        pong -> pong
    end.

loop() ->
    receive
        {Pid, ping} ->
             spawn(crash, do_not_exist, []),
             Pid ! pong,
             loop()
      end.

Thanks!
Francesco
--
http://www.erlang-consulting.com

-------------- next part --------------
A non-text attachment was scrubbed...
Name: francesco.vcf
Type: text/x-vcard
Size: 352 bytes
Desc: Card for Francesco Cesarini
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20011024/ec195fa9/attachment.vcf>


More information about the erlang-questions mailing list