Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

42 lignes
869 B

il y a 3 ans
il y a 3 ans
il y a 3 ans
il y a 3 ans
il y a 3 ans
il y a 3 ans
il y a 3 ans
il y a 3 ans
il y a 3 ans
il y a 3 ans
il y a 3 ans
  1. -module(tpTracerShell).
  2. -export([
  3. start_link/1
  4. , init/1
  5. , loop/1
  6. ]).
  7. -export([
  8. system_continue/3
  9. , system_terminate/4
  10. , system_code_change/4
  11. ]).
  12. start_link(_TracerOpts) ->
  13. Pid = proc_lib:spawn_link(?MODULE, init, [self()]),
  14. {ok, Pid}.
  15. init(Parent) ->
  16. process_flag(message_queue_data, off_heap),
  17. process_flag(trap_exit, true),
  18. ?MODULE:loop(Parent).
  19. loop(Parent) ->
  20. receive
  21. {system, From, Request} ->
  22. sys:handle_system_msg(Request, From, Parent, ?MODULE, [], Parent);
  23. RMsg ->
  24. io:format("~10000p\n", [RMsg]),
  25. %erlang:display(RMsg),
  26. ?MODULE:loop(Parent)
  27. end.
  28. system_continue(_, _, Parent) ->
  29. ?MODULE:loop(Parent).
  30. -spec system_terminate(any(), _, _, _) -> no_return().
  31. system_terminate(Reason, _, _, _) ->
  32. exit(Reason).
  33. system_code_change(Misc, _, _, _) ->
  34. {ok, Misc}.