From b0900fc2f7daab1c77dd8878c39ab24591bb076b Mon Sep 17 00:00:00 2001 From: Xavier Noria Date: Thu, 5 Apr 2018 01:40:20 +0200 Subject: Explain why the AM becomes group leader --- system/doc/design_principles/applications.xml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'system/doc') diff --git a/system/doc/design_principles/applications.xml b/system/doc/design_principles/applications.xml index c673fde07e..6e5a2ce6cf 100644 --- a/system/doc/design_principles/applications.xml +++ b/system/doc/design_principles/applications.xml @@ -363,9 +363,13 @@ ok application are running.

The application controller then creates an - application master for the application. The application master - is the group leader of all the processes in the application. - The application master starts the application by calling + application master for the application. The application + master becomes the group leader of all the processes in the + application. I/O is forwarded to the previous group leader, + though, this is just a way to identify processes that belong to + the application. Used for example to find itself from any process, + or, reciprocally, to kill them all when it terminates.

+

The application master starts the application by calling the application callback function start/2 in the module, and with the start argument, defined by the mod key in the .app file.

-- cgit v1.2.3