Skip to Main Content
Mastering Elixir
book

Mastering Elixir

by André Albuquerque, Daniel Caixinha
July 2018
Intermediate to advanced content levelIntermediate to advanced
574 pages
14h 7m
English
Packt Publishing
Content preview from Mastering Elixir

Using links

One way to detect the crash of a process is through the use of links. When two processes are linked, and one exits, the other one will receive an exit signal, which notifies us that a process has crashed. One link always contains two processes, and the connection is bidirectional. One process may be linked to an arbitrary number of other processes, and there's no predefined limit in the system to the number of created links.

Besides the PID of the crashed process, the exit signal also contains the exit reason, which is an arbitrary term that describes the reason for the termination of the process. If the termination is a normal one, which means that the spawned process has finished its execution, the exit reason is :normal. By ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Testing Elixir

Testing Elixir

Andrea Leopardi, Jeffrey Matthias

Publisher Resources

ISBN: 9781788472678Supplemental Content