Offset 1, 36 lines modified | Offset 1, 36 lines modified | ||
1 | HEADERIMMUTABLE:·000000350003e54c0000003f000000070003e53c0000001000000064000000080000000000000001000003e8000000060000000200000001000003e9000000060000000d00000001000003ea000000060000001200000001000003ec000000090000001900000001000003ed000000090000002e00000001000003ee000000040000004800000001000003ef000000060000004c00000001000003f1000000040000006800000001000003f6000000060000006c00000001000003f8000000090000007100000001000003fc000000060000008700000001000003fd000000060000009d00000001000003fe00000006000000a3000000010000040400000004000000ac000006ee000004060000000300001c64000006ee000004090000000300002a40000006ee0000040a000000040000381c000006ee0000040b00000008000053d4000006ee0000040c000000080001e782000006ee0000040d000000040001ee70000006ee0000040f0000000800020a28000006ee000004100000000800022cce000006ee000004140000000600024f7400000001000004150000000400024f90000006ee000004170000000800026b4800000001000004180000000400026b5400000004000004190000000800026b64000000040000041a0000000800026bc700000004000004280000000600026be30000000·✂ | 1 | HEADERIMMUTABLE:·000000350003e54c0000003f000000070003e53c0000001000000064000000080000000000000001000003e8000000060000000200000001000003e9000000060000000d00000001000003ea000000060000001200000001000003ec000000090000001900000001000003ed000000090000002e00000001000003ee000000040000004800000001000003ef000000060000004c00000001000003f1000000040000006800000001000003f6000000060000006c00000001000003f8000000090000007100000001000003fc000000060000008700000001000003fd000000060000009d00000001000003fe00000006000000a3000000010000040400000004000000ac000006ee000004060000000300001c64000006ee000004090000000300002a40000006ee0000040a000000040000381c000006ee0000040b00000008000053d4000006ee0000040c000000080001e782000006ee0000040d000000040001ee70000006ee0000040f0000000800020a28000006ee000004100000000800022cce000006ee000004140000000600024f7400000001000004150000000400024f90000006ee000004170000000800026b4800000001000004180000000400026b5400000004000004190000000800026b64000000040000041a0000000800026bc700000004000004280000000600026be30000000·✂ |
2 | HEADERI18NTABLE:· | 2 | HEADERI18NTABLE:· |
3 | ·-·C | 3 | ·-·C |
4 |
SIGSIZE:·15592 |
4 | SIGSIZE:·15592704 |
5 |
SIGMD5:· |
5 | SIGMD5:·c963bfe93b8363912966bd25c398e1cd |
6 |
SHA1HEADER:· |
6 | SHA1HEADER:·7bf1b0ee8a4398f28a2542ec3a331f3f0a3ce5c8 |
7 | NAME:·erlang-doc | 7 | NAME:·erlang-doc |
8 | VERSION:·17.4 | 8 | VERSION:·17.4 |
9 | RELEASE:·5.fc23 | 9 | RELEASE:·5.fc23 |
10 | SUMMARY:·Erlang·documentation | 10 | SUMMARY:·Erlang·documentation |
11 | DESCRIPTION:·Documentation·for·Erlang. | 11 | DESCRIPTION:·Documentation·for·Erlang. |
12 |
BUILDTIME:·145703 |
12 | BUILDTIME:·1457033964 |
13 | BUILDHOST:·profitbricks-build3-amd64 | 13 | BUILDHOST:·profitbricks-build3-amd64 |
14 |
SIZE:·16190223 |
14 | SIZE:·161902232 |
15 | LICENSE:·ERPL | 15 | LICENSE:·ERPL |
16 | GROUP:·Development/Languages | 16 | GROUP:·Development/Languages |
17 | URL:·http://www.erlang.org | 17 | URL:·http://www.erlang.org |
18 | OS:·linux | 18 | OS:·linux |
19 | ARCH:·noarch | 19 | ARCH:·noarch |
20 | FILESIZES:· | 20 | FILESIZES:· |
21 | ·-·4096·-·29731·-·4096·-·33888·-·45445·-·2140·-·25239·-·687·-·1491·-·1108·-·518·-·1649·-·26085·-·24618·-·27809·-·25823·-·2899·-·21130·-·1539·-·51260·-·28754·-·34613·-·1974·-·2536·-·1629·-·31677·-·15233·-·4096·-·1701·-·13560·-·22349·-·4444·-·5001·-·6054·-·4944·-·6183·-·4096·-·3727·-·19528·-·3549·-·17775·-·982·-·31861·-·2003·-·822·-·18781·-·15606·-·17719·-·11729·-·17360·-·17480·-·19739·-·21814·-·24690·-·10062·-·4096·-·6026·-·34264·-·4411·-·14795·-·4096·-·44440·-·8319·-·18426·-·24564·-·68057·-·6844·-·10180·-·4096·-·46540·-·59416·-·56744·-·7770·-·4096·-·328·-·328·-·316·-·6713·-·4096·-·6957·-·4096·-·82·-·86·-·109·-·12663·-·115395·-·246·-·4096·-·14946·-·2343·-·2239·-·3134·-·1406·-·3503·-·2291·-·4096·-·1124298·-·4096·-·22615·-·31228·-·14109·-·15602·-·6671·-·4096·-·20598·-·23550·-·31920·-·29705·-·25857·-·89729·-·22817·-·18264·-·25682·-·28360·-·17323·-·24288·-·25305·-·23105·-·39333·-·16224·-·4096·-·12581·-·3720·-·4096·-·38167·-·10721·-·17223·-·10658·-·6721·-·20930·-·4096·-·14128·-·17263·-·25877·-·1629·-·2564·-·2735·-··✂ | 21 | ·-·4096·-·29731·-·4096·-·33888·-·45445·-·2140·-·25239·-·687·-·1491·-·1108·-·518·-·1649·-·26085·-·24618·-·27809·-·25823·-·2899·-·21130·-·1539·-·51260·-·28754·-·34613·-·1974·-·2536·-·1629·-·31677·-·15233·-·4096·-·1701·-·13560·-·22349·-·4444·-·5001·-·6054·-·4944·-·6183·-·4096·-·3727·-·19528·-·3549·-·17775·-·982·-·31861·-·2003·-·822·-·18781·-·15606·-·17719·-·11729·-·17360·-·17480·-·19739·-·21814·-·24690·-·10062·-·4096·-·6026·-·34264·-·4411·-·14795·-·4096·-·44440·-·8319·-·18426·-·24564·-·68057·-·6844·-·10180·-·4096·-·46540·-·59416·-·56744·-·7770·-·4096·-·328·-·328·-·316·-·6713·-·4096·-·6957·-·4096·-·82·-·86·-·109·-·12663·-·115395·-·246·-·4096·-·14946·-·2343·-·2239·-·3134·-·1406·-·3503·-·2291·-·4096·-·1124298·-·4096·-·22615·-·31228·-·14109·-·15602·-·6671·-·4096·-·20598·-·23550·-·31920·-·29705·-·25857·-·89729·-·22817·-·18264·-·25682·-·28360·-·17323·-·24288·-·25305·-·23105·-·39333·-·16224·-·4096·-·12581·-·3720·-·4096·-·38167·-·10721·-·17223·-·10658·-·6721·-·20930·-·4096·-·14128·-·17263·-·25877·-·1629·-·2564·-·2735·-··✂ |
22 | FILEMODES:· | 22 | FILEMODES:· |
23 | ·-·16877·-·33188·-·16877·-·33188·-·33188·-·33188·-·33188·-·33188·-·33188·-·33188·-·33188·-·33188·-·33188·-·33188·-·33188·-·33188·-·33188·-·33188·-·33188·-·33188·-·33188·-·33188·-·33188·-·33188·-·33188·-·33188·-·33188·-·16877·-·33188·-·33188·-·33188·-·33188·-·33188·-·33188·-·33188·-·33188·-·16877·-·33188·-·33188·-·33188·-·33188·-·33188·-·33188·-·33188·-·33188·-·33188·-·33188·-·33188·-·33188·-·33188·-·33188·-·33188·-·33188·-·33188·-·33188·-·16877·-·33188·-·33188·-·33188·-·33188·-·16877·-·33188·-·33188·-·33188·-·33188·-·33188·-·33188·-·33188·-·16877·-·33188·-·33188·-·33188·-·33188·-·16877·-·33188·-·33188·-·33188·-·33188·-·16877·-·33188·-·16877·-·33188·-·33188·-·33188·-·33188·-·33188·-·33188·-·16877·-·33188·-·33188·-·33188·-·33188·-·33188·-·33188·-·33188·-·16877·-·33188·-·16877·-·33188·-·33188·-·33188·-·33188·-·33188·-·16877·-·33188·-·33188·-·33188·-·33188·-·33188·-·33188·-·33188·-·33188·-·33188·-·33188·-·33188·-·33188·-·33188·-·33188·-·33188·-·33188·-·16877·-·33188·-·33188·-·16877·-·33188·-·33188·-·33188·-·33188·✂ | 23 | ·-·16877·-·33188·-·16877·-·33188·-·33188·-·33188·-·33188·-·33188·-·33188·-·33188·-·33188·-·33188·-·33188·-·33188·-·33188·-·33188·-·33188·-·33188·-·33188·-·33188·-·33188·-·33188·-·33188·-·33188·-·33188·-·33188·-·33188·-·16877·-·33188·-·33188·-·33188·-·33188·-·33188·-·33188·-·33188·-·33188·-·16877·-·33188·-·33188·-·33188·-·33188·-·33188·-·33188·-·33188·-·33188·-·33188·-·33188·-·33188·-·33188·-·33188·-·33188·-·33188·-·33188·-·33188·-·33188·-·16877·-·33188·-·33188·-·33188·-·33188·-·16877·-·33188·-·33188·-·33188·-·33188·-·33188·-·33188·-·33188·-·16877·-·33188·-·33188·-·33188·-·33188·-·16877·-·33188·-·33188·-·33188·-·33188·-·16877·-·33188·-·16877·-·33188·-·33188·-·33188·-·33188·-·33188·-·33188·-·16877·-·33188·-·33188·-·33188·-·33188·-·33188·-·33188·-·33188·-·16877·-·33188·-·16877·-·33188·-·33188·-·33188·-·33188·-·33188·-·16877·-·33188·-·33188·-·33188·-·33188·-·33188·-·33188·-·33188·-·33188·-·33188·-·33188·-·33188·-·33188·-·33188·-·33188·-·33188·-·33188·-·16877·-·33188·-·33188·-·16877·-·33188·-·33188·-·33188·-·33188·✂ |
24 | FILERDEVS:· | 24 | FILERDEVS:· |
25 | ·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·✂ | 25 | ·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·-·0·✂ |
26 | FILEMTIMES:· | 26 | FILEMTIMES:· |
27 |
·-·145703 |
27 | ·-·1457033880·-·1457033880·-·1457033879·-·1457033879·-·1457033879·-·1457033879·-·1457033879·-·1457033879·-·1457033879·-·1457033879·-·1457033879·-·1457033879·-·1457033879·-·1457033879·-·1457033879·-·1457033879·-·1457033879·-·1457033879·-·1457033879·-·1457033879·-·1457033879·-·1457033879·-·1457033879·-·1457033879·-·1457033879·-·1457033879·-·1457033879·-·1457033880·-·1457033880·-·1457033880·-·1457033880·-·1457033880·-·1457033880·-·1457033880·-·1457033880·-·1457033880·-·1457033880·-·1457033880·-·1457033880·-·1457033880·-·1457033880·-·1457033880·-·1457033880·-·1457033880·-·1457033880·-·1457033880·-·1457033880·-·1457033880·-·1457033880·-·1457033880·-·1457033880·-·1457033880·-·1457033880·-·1457033880·-·1457033880·-·1457033879·-·1457033879·-·1457033879·-·1457033879·-·1457033856·-·1457033879·-·1457033879·-·1457033879·-·1457033879·-·1457033879·-·1457033879·-·1457033879·-·1457033880·-·1457033880·-·1457033880·-·1457033880·-·1457033880·-·1457033880·-·1457033880·-·1457033880·-·1457033880·-·1457033880·-·1457033880·-·1457033·✂ |
28 | FILEMD5S:· | 28 | FILEMD5S:· |
29 |
·-··-·02f431f9dc8ee6b270b3193c07c1a75d5ab0299ae2a72c9ad85c425abb042ea4·-··-· |
29 | ·-··-·02f431f9dc8ee6b270b3193c07c1a75d5ab0299ae2a72c9ad85c425abb042ea4·-··-·8c72a87e46391b2358a42e9578a945614e0b7a75df887edfa4719db7e45b55ae·-·429fa17cd190d5b0c5bba30c09a8b8b2040054dacffee3ce8e5641640312bda0·-·c0ab95f5711104deeedece210d810ae001b430183c9b46c1e6bf87072be39ad4·-·d307dd0be732f786fa7d49801e6ef1da306f49cf9e1ef0454a45895a8f64ad52·-·dad8e3442f08e50146d76b18b4faed7029e4324050d2556eebc2033317ce7785·-·5ad643b2a89a480125089b55541cf2e3619573f0acfd110deff6cb00630f8cec·-·859dff197a125cac62cc89245ff435b6045f6ee8f63f9b9e3486a4e719481d07·-·071ed4bc76dde5b8b50a83eedbeb46fb0953d323581c4120fcb8cbc4a626dd15·-·b638a09ce1c8852b6dd61e4ffa8801f70476f54d62a964259cda5adf09617809·-·85af5b63d9cb3c268dcd70b93b86a672950db4d01cc942c49bdf125c1355057b·-·8b3815137ec78b1e56b2be4a73d45e99769931b17e6429ce1c9788951311fe01·-·3c336e1c2369786f5bb5cd9a010c09db2248a9a6ae7dfa76340cddc6765a08e2·-·2addb4f02e37c281c85627d73fd15e192ed7ca7cd600bb6ec8dc0956cfd097ca·-·00076bdcdc6d76ad03b5c1dc9671b4b4d02c5013b62eaac4da2b92f60867cc39·-·714cdf1377·✂ |
30 | FILELINKTOS:· | 30 | FILELINKTOS:· |
31 | ·-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-···✂ | 31 | ·-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-··-···✂ |
32 | FILEFLAGS:· | 32 | FILEFLAGS:· |
33 | ·-·0·-·2·-·0·-·2·-·2·-·2·-·2·-·2·-·2·-·2·-·2·-·2·-·2·-·2·-·2·-·2·-·2·-·2·-·2·-·2·-·2·-·2·-·2·-·2·-·2·-·2·-·2·-·0·-·2·-·2·-·2·-·2·-·2·-·2·-·2·-·2·-·0·-·2·-·2·-·2·-·2·-·2·-·2·-·2·-·2·-·2·-·2·-·2·-·2·-·2·-·2·-·2·-·2·-·2·-·2·-·0·-·2·-·2·-·2·-·2·-·0·-·2·-·2·-·2·-·2·-·2·-·2·-·2·-·0·-·2·-·2·-·2·-·2·-·0·-·2·-·2·-·2·-·2·-·0·-·2·-·0·-·2·-·2·-·2·-·2·-·2·-·2·-·0·-·2·-·2·-·2·-·2·-·2·-·2·-·2·-·0·-·2·-·0·-·2·-·2·-·2·-·2·-·2·-·0·-·2·-·2·-·2·-·2·-·2·-·2·-·2·-·2·-·2·-·2·-·2·-·2·-·2·-·2·-·2·-·2·-·0·-·2·-·2·-·0·-·2·-·2·-·2·-·2·-·2·-·2·-·0·-·2·-·2·-·2·-·2·-·2·-·2·-·2·-·2·-·2·-·2·-·2·-·2·-·2·-·2·-·2·-·2·-·2·-·2·-·2·-·2·-·2·-·2·-·2·-·2·-·0·-·0·-·2·-·2·-·2·-·2·-·2·-·2·-·2·-·2·-·2·-·2·-·2·-·2·-·2·-·2·-·2·-·2·-·2·-·2·-·2·-·2·-·2·-·2·-·2·-·2·-·2·-·2·-·2·-·2·-·2·-·2·-·2·-·2·-·2·-·2·-·0·-·2·-·0·-·0·-·0·-·2·-·2·-·2·-·2·-·2·-·2·-·2·-·2·-·2·-·2·-·2·-·2·-·0·-·2·-·0·-·0·-·2·-·2·-·2·-·2·-·2·-·2·-·2·-·2·-·2·-·2·-·2·-·2·-·2·-·2·-·2·-·2·-·2·-·2·-·2·-·2·-·2·-·2·-·2·-·2·-·2·-·2·-·2·-·2·-·2·-·2·-·2·-·2·-·2·-·2·-·2·-·2·-·2·-·0·-·2·-·0·-·0·-·2·-·2·-·2·✂ | 33 | ·-·0·-·2·-·0·-·2·-·2·-·2·-·2·-·2·-·2·-·2·-·2·-·2·-·2·-·2·-·2·-·2·-·2·-·2·-·2·-·2·-·2·-·2·-·2·-·2·-·2·-·2·-·2·-·0·-·2·-·2·-·2·-·2·-·2·-·2·-·2·-·2·-·0·-·2·-·2·-·2·-·2·-·2·-·2·-·2·-·2·-·2·-·2·-·2·-·2·-·2·-·2·-·2·-·2·-·2·-·2·-·0·-·2·-·2·-·2·-·2·-·0·-·2·-·2·-·2·-·2·-·2·-·2·-·2·-·0·-·2·-·2·-·2·-·2·-·0·-·2·-·2·-·2·-·2·-·0·-·2·-·0·-·2·-·2·-·2·-·2·-·2·-·2·-·0·-·2·-·2·-·2·-·2·-·2·-·2·-·2·-·0·-·2·-·0·-·2·-·2·-·2·-·2·-·2·-·0·-·2·-·2·-·2·-·2·-·2·-·2·-·2·-·2·-·2·-·2·-·2·-·2·-·2·-·2·-·2·-·2·-·0·-·2·-·2·-·0·-·2·-·2·-·2·-·2·-·2·-·2·-·0·-·2·-·2·-·2·-·2·-·2·-·2·-·2·-·2·-·2·-·2·-·2·-·2·-·2·-·2·-·2·-·2·-·2·-·2·-·2·-·2·-·2·-·2·-·2·-·2·-·0·-·0·-·2·-·2·-·2·-·2·-·2·-·2·-·2·-·2·-·2·-·2·-·2·-·2·-·2·-·2·-·2·-·2·-·2·-·2·-·2·-·2·-·2·-·2·-·2·-·2·-·2·-·2·-·2·-·2·-·2·-·2·-·2·-·2·-·2·-·2·-·0·-·2·-·0·-·0·-·0·-·2·-·2·-·2·-·2·-·2·-·2·-·2·-·2·-·2·-·2·-·2·-·2·-·0·-·2·-·0·-·0·-·2·-·2·-·2·-·2·-·2·-·2·-·2·-·2·-·2·-·2·-·2·-·2·-·2·-·2·-·2·-·2·-·2·-·2·-·2·-·2·-·2·-·2·-·2·-·2·-·2·-·2·-·2·-·2·-·2·-·2·-·2·-·2·-·2·-·2·-·2·-·2·-·2·-·0·-·2·-·0·-·0·-·2·-·2·-·2·✂ |
34 | FILEUSERNAME:· | 34 | FILEUSERNAME:· |
35 | ·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·✂ | 35 | ·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·root·-·✂ |
36 | FILEGROUPNAME:· | 36 | FILEGROUPNAME:· |
Offset 1, 1774 lines modified | Offset 1, 1774 lines modified | ||
1 |
drwxr-xr-x···1········0········0········0·2016-03-03·1 |
1 | drwxr-xr-x···1········0········0········0·2016-03-03·19:38:00.000000·./usr/share/doc/erlang-17.4/doc |
2 |
-rw-r--r--···1········0········0····29731·2016-03-03·1 |
2 | -rw-r--r--···1········0········0····29731·2016-03-03·19:38:00.000000·./usr/share/doc/erlang-17.4/doc/applications.html |
3 |
drwxr-xr-x···1········0········0········0·2016-03-03·1 |
3 | drwxr-xr-x···1········0········0········0·2016-03-03·19:37:59.000000·./usr/share/doc/erlang-17.4/doc/design_principles |
4 |
-rw-r--r--···1········0········0····33888·2016-03-03·1 |
4 | -rw-r--r--···1········0········0····33888·2016-03-03·19:37:59.000000·./usr/share/doc/erlang-17.4/doc/design_principles/applications.html |
5 |
-rw-r--r--···1········0········0····45445·2016-03-03·1 |
5 | -rw-r--r--···1········0········0····45445·2016-03-03·19:37:59.000000·./usr/share/doc/erlang-17.4/doc/design_principles/appup_cookbook.html |
6 |
-rw-r--r--···1········0········0·····2140·2016-03-03·1 |
6 | -rw-r--r--···1········0········0·····2140·2016-03-03·19:37:59.000000·./usr/share/doc/erlang-17.4/doc/design_principles/clientserver.gif |
7 |
-rw-r--r--···1········0········0····25239·2016-03-03·1 |
7 | -rw-r--r--···1········0········0····25239·2016-03-03·19:37:59.000000·./usr/share/doc/erlang-17.4/doc/design_principles/des_princ.html |
8 |
-rw-r--r--···1········0········0······687·2016-03-03·1 |
8 | -rw-r--r--···1········0········0······687·2016-03-03·19:37:59.000000·./usr/share/doc/erlang-17.4/doc/design_principles/dist1.gif |
9 |
-rw-r--r--···1········0········0·····1491·2016-03-03·1 |
9 | -rw-r--r--···1········0········0·····1491·2016-03-03·19:37:59.000000·./usr/share/doc/erlang-17.4/doc/design_principles/dist2.gif |
10 |
-rw-r--r--···1········0········0·····1108·2016-03-03·1 |
10 | -rw-r--r--···1········0········0·····1108·2016-03-03·19:37:59.000000·./usr/share/doc/erlang-17.4/doc/design_principles/dist3.gif |
11 |
-rw-r--r--···1········0········0······518·2016-03-03·1 |
11 | -rw-r--r--···1········0········0······518·2016-03-03·19:37:59.000000·./usr/share/doc/erlang-17.4/doc/design_principles/dist4.gif |
12 |
-rw-r--r--···1········0········0·····1649·2016-03-03·1 |
12 | -rw-r--r--···1········0········0·····1649·2016-03-03·19:37:59.000000·./usr/share/doc/erlang-17.4/doc/design_principles/dist5.gif |
13 |
-rw-r--r--···1········0········0····26085·2016-03-03·1 |
13 | -rw-r--r--···1········0········0····26085·2016-03-03·19:37:59.000000·./usr/share/doc/erlang-17.4/doc/design_principles/distributed_applications.html |
14 |
-rw-r--r--···1········0········0····24618·2016-03-03·1 |
14 | -rw-r--r--···1········0········0····24618·2016-03-03·19:37:59.000000·./usr/share/doc/erlang-17.4/doc/design_principles/events.html |
15 |
-rw-r--r--···1········0········0····27809·2016-03-03·1 |
15 | -rw-r--r--···1········0········0····27809·2016-03-03·19:37:59.000000·./usr/share/doc/erlang-17.4/doc/design_principles/fsm.html |
16 |
-rw-r--r--···1········0········0····25823·2016-03-03·1 |
16 | -rw-r--r--···1········0········0····25823·2016-03-03·19:37:59.000000·./usr/share/doc/erlang-17.4/doc/design_principles/gen_server_concepts.html |
17 |
-rw-r--r--···1········0········0·····2899·2016-03-03·1 |
17 | -rw-r--r--···1········0········0·····2899·2016-03-03·19:37:59.000000·./usr/share/doc/erlang-17.4/doc/design_principles/inclappls.gif |
18 |
-rw-r--r--···1········0········0····21130·2016-03-03·1 |
18 | -rw-r--r--···1········0········0····21130·2016-03-03·19:37:59.000000·./usr/share/doc/erlang-17.4/doc/design_principles/included_applications.html |
19 |
-rw-r--r--···1········0········0·····1539·2016-03-03·1 |
19 | -rw-r--r--···1········0········0·····1539·2016-03-03·19:37:59.000000·./usr/share/doc/erlang-17.4/doc/design_principles/note.gif |
20 |
-rw-r--r--···1········0········0····51260·2016-03-03·1 |
20 | -rw-r--r--···1········0········0····51260·2016-03-03·19:37:59.000000·./usr/share/doc/erlang-17.4/doc/design_principles/release_handling.html |
21 |
-rw-r--r--···1········0········0····28754·2016-03-03·1 |
21 | -rw-r--r--···1········0········0····28754·2016-03-03·19:37:59.000000·./usr/share/doc/erlang-17.4/doc/design_principles/release_structure.html |
22 |
-rw-r--r--···1········0········0····34613·2016-03-03·1 |
22 | -rw-r--r--···1········0········0····34613·2016-03-03·19:37:59.000000·./usr/share/doc/erlang-17.4/doc/design_principles/spec_proc.html |
23 |
-rw-r--r--···1········0········0·····1974·2016-03-03·1 |
23 | -rw-r--r--···1········0········0·····1974·2016-03-03·19:37:59.000000·./usr/share/doc/erlang-17.4/doc/design_principles/sup4.gif |
24 |
-rw-r--r--···1········0········0·····2536·2016-03-03·1 |
24 | -rw-r--r--···1········0········0·····2536·2016-03-03·19:37:59.000000·./usr/share/doc/erlang-17.4/doc/design_principles/sup5.gif |
25 |
-rw-r--r--···1········0········0·····1629·2016-03-03·1 |
25 | -rw-r--r--···1········0········0·····1629·2016-03-03·19:37:59.000000·./usr/share/doc/erlang-17.4/doc/design_principles/sup6.gif |
26 |
-rw-r--r--···1········0········0····31677·2016-03-03·1 |
26 | -rw-r--r--···1········0········0····31677·2016-03-03·19:37:59.000000·./usr/share/doc/erlang-17.4/doc/design_principles/sup_princ.html |
27 |
-rw-r--r--···1········0········0····15233·2016-03-03·1 |
27 | -rw-r--r--···1········0········0····15233·2016-03-03·19:37:59.000000·./usr/share/doc/erlang-17.4/doc/design_principles/users_guide.html |
28 |
drwxr-xr-x···1········0········0········0·2016-03-03·1 |
28 | drwxr-xr-x···1········0········0········0·2016-03-03·19:38:00.000000·./usr/share/doc/erlang-17.4/doc/docbuild |
29 |
-rw-r--r--···1········0········0·····1701·2016-03-03·1 |
29 | -rw-r--r--···1········0········0·····1701·2016-03-03·19:38:00.000000·./usr/share/doc/erlang-17.4/doc/docbuild/applications.html.src |
30 |
-rw-r--r--···1········0········0····13560·2016-03-03·1 |
30 | -rw-r--r--···1········0········0····13560·2016-03-03·19:38:00.000000·./usr/share/doc/erlang-17.4/doc/docbuild/erl_html_tools.beam |
31 |
-rw-r--r--···1········0········0····22349·2016-03-03·1 |
31 | -rw-r--r--···1········0········0····22349·2016-03-03·19:38:00.000000·./usr/share/doc/erlang-17.4/doc/docbuild/erl_html_tools.erl |
32 |
-rw-r--r--···1········0········0·····4444·2016-03-03·1 |
32 | -rw-r--r--···1········0········0·····4444·2016-03-03·19:38:00.000000·./usr/share/doc/erlang-17.4/doc/docbuild/erlresolvelinks.beam |
33 |
-rw-r--r--···1········0········0·····5001·2016-03-03·1 |
33 | -rw-r--r--···1········0········0·····5001·2016-03-03·19:38:00.000000·./usr/share/doc/erlang-17.4/doc/docbuild/erlresolvelinks.erl |
34 |
-rw-r--r--···1········0········0·····6054·2016-03-03·1 |
34 | -rw-r--r--···1········0········0·····6054·2016-03-03·19:38:00.000000·./usr/share/doc/erlang-17.4/doc/docbuild/index.html.src |
35 |
-rw-r--r--···1········0········0·····4944·2016-03-03·1 |
35 | -rw-r--r--···1········0········0·····4944·2016-03-03·19:38:00.000000·./usr/share/doc/erlang-17.4/doc/docbuild/otp_man_index.beam |
36 |
-rw-r--r--···1········0········0·····6183·2016-03-03·1 |
36 | -rw-r--r--···1········0········0·····6183·2016-03-03·19:38:00.000000·./usr/share/doc/erlang-17.4/doc/docbuild/otp_man_index.erl |
37 |
drwxr-xr-x···1········0········0········0·2016-03-03·1 |
37 | drwxr-xr-x···1········0········0········0·2016-03-03·19:38:00.000000·./usr/share/doc/erlang-17.4/doc/efficiency_guide |
38 |
-rw-r--r--···1········0········0·····3727·2016-03-03·1 |
38 | -rw-r--r--···1········0········0·····3727·2016-03-03·19:38:00.000000·./usr/share/doc/erlang-17.4/doc/efficiency_guide/README |
39 |
-rw-r--r--···1········0········0····19528·2016-03-03·1 |
39 | -rw-r--r--···1········0········0····19528·2016-03-03·19:38:00.000000·./usr/share/doc/erlang-17.4/doc/efficiency_guide/advanced.html |
40 |
-rw-r--r--···1········0········0·····3549·2016-03-03·1 |
40 | -rw-r--r--···1········0········0·····3549·2016-03-03·19:38:00.000000·./usr/share/doc/erlang-17.4/doc/efficiency_guide/all.erl |
41 |
-rw-r--r--···1········0········0····17775·2016-03-03·1 |
41 | -rw-r--r--···1········0········0····17775·2016-03-03·19:38:00.000000·./usr/share/doc/erlang-17.4/doc/efficiency_guide/bench.erl |
42 |
-rw-r--r--···1········0········0······982·2016-03-03·1 |
42 | -rw-r--r--···1········0········0······982·2016-03-03·19:38:00.000000·./usr/share/doc/erlang-17.4/doc/efficiency_guide/bench.hrl |
43 |
-rw-r--r--···1········0········0····31861·2016-03-03·1 |
43 | -rw-r--r--···1········0········0····31861·2016-03-03·19:38:00.000000·./usr/share/doc/erlang-17.4/doc/efficiency_guide/binaryhandling.html |
44 |
-rw-r--r--···1········0········0·····2003·2016-03-03·1 |
44 | -rw-r--r--···1········0········0·····2003·2016-03-03·19:38:00.000000·./usr/share/doc/erlang-17.4/doc/efficiency_guide/call_bm.erl |
45 |
-rw-r--r--···1········0········0······822·2016-03-03·1 |
45 | -rw-r--r--···1········0········0······822·2016-03-03·19:38:00.000000·./usr/share/doc/erlang-17.4/doc/efficiency_guide/call_result.html |
46 |
-rw-r--r--···1········0········0····18781·2016-03-03·1 |
46 | -rw-r--r--···1········0········0····18781·2016-03-03·19:38:00.000000·./usr/share/doc/erlang-17.4/doc/efficiency_guide/commoncaveats.html |
47 |
-rw-r--r--···1········0········0····15606·2016-03-03·1 |
47 | -rw-r--r--···1········0········0····15606·2016-03-03·19:38:00.000000·./usr/share/doc/erlang-17.4/doc/efficiency_guide/drivers.html |
48 |
-rw-r--r--···1········0········0····17719·2016-03-03·1 |
48 | -rw-r--r--···1········0········0····17719·2016-03-03·19:38:00.000000·./usr/share/doc/erlang-17.4/doc/efficiency_guide/functions.html |
49 |
-rw-r--r--···1········0········0····11729·2016-03-03·1 |
49 | -rw-r--r--···1········0········0····11729·2016-03-03·19:38:00.000000·./usr/share/doc/erlang-17.4/doc/efficiency_guide/introduction.html |
50 |
-rw-r--r--···1········0········0····17360·2016-03-03·1 |
50 | -rw-r--r--···1········0········0····17360·2016-03-03·19:38:00.000000·./usr/share/doc/erlang-17.4/doc/efficiency_guide/listHandling.html |
51 | [·1724·lines·removed·] | 51 | [·1724·lines·removed·] |
Offset 47, 181 lines modified | Offset 47, 181 lines modified | ||
47 | <img·alt="Erlang·logo"·src="../erlang-logo.png"><br><small><a·href="users_guide.html">User's·Guide</a><br><a·href="../pdf/otp-system-documentation-6.3.pdf">PDF</a><br><a·href="../index.html">Top</a></small><p><strong>OTP·Design·Principles</strong><br><strong>User's·Guide</strong><br><small>Version·6.3</small></p> | 47 | <img·alt="Erlang·logo"·src="../erlang-logo.png"><br><small><a·href="users_guide.html">User's·Guide</a><br><a·href="../pdf/otp-system-documentation-6.3.pdf">PDF</a><br><a·href="../index.html">Top</a></small><p><strong>OTP·Design·Principles</strong><br><strong>User's·Guide</strong><br><small>Version·6.3</small></p> |
48 | <br><a·href="javascript:openAllFlips()">Expand·All</a><br><a·href="javascript:closeAllFlips()">Contract·All</a><p><small><strong>Chapters</strong></small></p> | 48 | <br><a·href="javascript:openAllFlips()">Expand·All</a><br><a·href="javascript:closeAllFlips()">Contract·All</a><p><small><strong>Chapters</strong></small></p> |
49 | <ul·class="flipMenu"·imagepath="../js/flipmenu"> | 49 | <ul·class="flipMenu"·imagepath="../js/flipmenu"> |
50 | <li·id="no"·title="Overview"·expanded="false">Overview<ul> | 50 | <li·id="no"·title="Overview"·expanded="false">Overview<ul> |
51 | <li><a·href="des_princ.html"> | 51 | <li><a·href="des_princ.html"> |
52 | ··············Top·of·chapter | 52 | ··············Top·of·chapter |
53 | ············</a></li> | 53 | ············</a></li> |
54 |
<li·title="Supervision·Trees"><a·href="des_princ.html#idm1 |
54 | <li·title="Supervision·Trees"><a·href="des_princ.html#idm140231008664592">Supervision·Trees</a></li> |
55 |
<li·title="Behaviours"><a·href="des_princ.html#idm1 |
55 | <li·title="Behaviours"><a·href="des_princ.html#idm140231008672688">Behaviours</a></li> |
56 |
<li·title="Applications"><a·href="des_princ.html#idm1 |
56 | <li·title="Applications"><a·href="des_princ.html#idm140231008752016">Applications</a></li> |
57 |
<li·title="Releases"><a·href="des_princ.html#idm1 |
57 | <li·title="Releases"><a·href="des_princ.html#idm140231008757072">Releases</a></li> |
58 |
<li·title="Release·Handling"><a·href="des_princ.html#idm1 |
58 | <li·title="Release·Handling"><a·href="des_princ.html#idm140231008760592">Release·Handling</a></li> |
59 | </ul> | 59 | </ul> |
60 | </li> | 60 | </li> |
61 | <li·id="no"·title="Gen_Server·Behaviour"·expanded="false">Gen_Server·Behaviour<ul> | 61 | <li·id="no"·title="Gen_Server·Behaviour"·expanded="false">Gen_Server·Behaviour<ul> |
62 | <li><a·href="gen_server_concepts.html"> | 62 | <li><a·href="gen_server_concepts.html"> |
63 | ··············Top·of·chapter | 63 | ··············Top·of·chapter |
64 | ············</a></li> | 64 | ············</a></li> |
65 |
<li·title="Client-Server·Principles"><a·href="gen_server_concepts.html#idm1 |
65 | <li·title="Client-Server·Principles"><a·href="gen_server_concepts.html#idm140231008770128">Client-Server·Principles</a></li> |
66 |
<li·title="Example"><a·href="gen_server_concepts.html#idm1 |
66 | <li·title="Example"><a·href="gen_server_concepts.html#idm140231008697632">Example</a></li> |
67 |
<li·title="Starting·a·Gen_Server"><a·href="gen_server_concepts.html#idm1 |
67 | <li·title="Starting·a·Gen_Server"><a·href="gen_server_concepts.html#idm140231008702000">Starting·a·Gen_Server</a></li> |
68 |
<li·title="Synchronous·Requests·-·Call"><a·href="gen_server_concepts.html#idm1 |
68 | <li·title="Synchronous·Requests·-·Call"><a·href="gen_server_concepts.html#idm140231008776224">Synchronous·Requests·-·Call</a></li> |
69 |
<li·title="Asynchronous·Requests·-·Cast"><a·href="gen_server_concepts.html#idm1 |
69 | <li·title="Asynchronous·Requests·-·Cast"><a·href="gen_server_concepts.html#idm140231008786432">Asynchronous·Requests·-·Cast</a></li> |
70 |
<li·title="Stopping"><a·href="gen_server_concepts.html#idm1 |
70 | <li·title="Stopping"><a·href="gen_server_concepts.html#idm140231009075376">Stopping</a></li> |
71 |
<li·title="Handling·Other·Messages"><a·href="gen_server_concepts.html#idm1 |
71 | <li·title="Handling·Other·Messages"><a·href="gen_server_concepts.html#idm140231008621744">Handling·Other·Messages</a></li> |
72 | </ul> | 72 | </ul> |
73 | </li> | 73 | </li> |
74 | <li·id="no"·title="Gen_Fsm·Behaviour"·expanded="false">Gen_Fsm·Behaviour<ul> | 74 | <li·id="no"·title="Gen_Fsm·Behaviour"·expanded="false">Gen_Fsm·Behaviour<ul> |
75 | <li><a·href="fsm.html"> | 75 | <li><a·href="fsm.html"> |
76 | ··············Top·of·chapter | 76 | ··············Top·of·chapter |
77 | ············</a></li> | 77 | ············</a></li> |
78 |
<li·title="Finite·State·Machines"><a·href="fsm.html#idm1 |
78 | <li·title="Finite·State·Machines"><a·href="fsm.html#idm140231009090752">Finite·State·Machines</a></li> |
79 |
<li·title="Example"><a·href="fsm.html#idm1 |
79 | <li·title="Example"><a·href="fsm.html#idm140231008799248">Example</a></li> |
80 |
<li·title="Starting·a·Gen_Fsm"><a·href="fsm.html#idm1 |
80 | <li·title="Starting·a·Gen_Fsm"><a·href="fsm.html#idm140231009551600">Starting·a·Gen_Fsm</a></li> |
81 |
<li·title="Notifying·About·Events"><a·href="fsm.html#idm1 |
81 | <li·title="Notifying·About·Events"><a·href="fsm.html#idm140231009115360">Notifying·About·Events</a></li> |
82 |
<li·title="Timeouts"><a·href="fsm.html#idm1 |
82 | <li·title="Timeouts"><a·href="fsm.html#idm140231009808544">Timeouts</a></li> |
83 |
<li·title="All·State·Events"><a·href="fsm.html#idm1 |
83 | <li·title="All·State·Events"><a·href="fsm.html#idm140231009303152">All·State·Events</a></li> |
84 |
<li·title="Stopping"><a·href="fsm.html#idm1 |
84 | <li·title="Stopping"><a·href="fsm.html#idm140231008912976">Stopping</a></li> |
85 |
<li·title="Handling·Other·Messages"><a·href="fsm.html#idm1 |
85 | <li·title="Handling·Other·Messages"><a·href="fsm.html#idm140231008432688">Handling·Other·Messages</a></li> |
86 | </ul> | 86 | </ul> |
87 | </li> | 87 | </li> |
88 | <li·id="no"·title="Gen_Event·Behaviour"·expanded="false">Gen_Event·Behaviour<ul> | 88 | <li·id="no"·title="Gen_Event·Behaviour"·expanded="false">Gen_Event·Behaviour<ul> |
89 | <li><a·href="events.html"> | 89 | <li><a·href="events.html"> |
90 | ··············Top·of·chapter | 90 | ··············Top·of·chapter |
91 | ············</a></li> | 91 | ············</a></li> |
92 |
<li·title="Event·Handling·Principles"><a·href="events.html#idm1 |
92 | <li·title="Event·Handling·Principles"><a·href="events.html#idm140231009179392">Event·Handling·Principles</a></li> |
93 |
<li·title="Example"><a·href="events.html#idm1 |
93 | <li·title="Example"><a·href="events.html#idm140231008417152">Example</a></li> |
94 |
<li·title="Starting·an·Event·Manager"><a·href="events.html#idm1 |
94 | <li·title="Starting·an·Event·Manager"><a·href="events.html#idm140231008413136">Starting·an·Event·Manager</a></li> |
95 |
<li·title="Adding·an·Event·Handler"><a·href="events.html#idm1 |
95 | <li·title="Adding·an·Event·Handler"><a·href="events.html#idm140231009388752">Adding·an·Event·Handler</a></li> |
96 |
<li·title="Notifying·About·Events"><a·href="events.html#idm1 |
96 | <li·title="Notifying·About·Events"><a·href="events.html#idm140231008728512">Notifying·About·Events</a></li> |
97 |
<li·title="Deleting·an·Event·Handler"><a·href="events.html#idm1 |
97 | <li·title="Deleting·an·Event·Handler"><a·href="events.html#idm140231008720736">Deleting·an·Event·Handler</a></li> |
98 |
<li·title="Stopping"><a·href="events.html#idm1 |
98 | <li·title="Stopping"><a·href="events.html#idm140231008689408">Stopping</a></li> |
99 |
<li·title="Handling·Other·Messages"><a·href="events.html#idm1 |
99 | <li·title="Handling·Other·Messages"><a·href="events.html#idm140231008683248">Handling·Other·Messages</a></li> |
100 | </ul> | 100 | </ul> |
101 | </li> | 101 | </li> |
102 | <li·id="no"·title="Supervisor·Behaviour"·expanded="false">Supervisor·Behaviour<ul> | 102 | <li·id="no"·title="Supervisor·Behaviour"·expanded="false">Supervisor·Behaviour<ul> |
103 | <li><a·href="sup_princ.html"> | 103 | <li><a·href="sup_princ.html"> |
104 | ··············Top·of·chapter | 104 | ··············Top·of·chapter |
105 | ············</a></li> | 105 | ············</a></li> |
106 |
<li·title="Supervision·Principles"><a·href="sup_princ.html#idm1 |
106 | <li·title="Supervision·Principles"><a·href="sup_princ.html#idm140231008291744">Supervision·Principles</a></li> |
107 |
<li·title="Example"><a·href="sup_princ.html#idm1 |
107 | <li·title="Example"><a·href="sup_princ.html#idm140231009682528">Example</a></li> |
108 |
<li·title="Restart·Strategy"><a·href="sup_princ.html#idm1 |
108 | <li·title="Restart·Strategy"><a·href="sup_princ.html#idm140231009629632">Restart·Strategy</a></li> |
109 |
<li·title="Maximum·Restart·Frequency"><a·href="sup_princ.html#idm1 |
109 | <li·title="Maximum·Restart·Frequency"><a·href="sup_princ.html#idm140231008896368">Maximum·Restart·Frequency</a></li> |
110 |
<li·title="Child·Specification"><a·href="sup_princ.html#idm1 |
110 | <li·title="Child·Specification"><a·href="sup_princ.html#idm140231008285744">Child·Specification</a></li> |
111 |
<li·title="Starting·a·Supervisor"><a·href="sup_princ.html#idm1 |
111 | <li·title="Starting·a·Supervisor"><a·href="sup_princ.html#idm140231008253328">Starting·a·Supervisor</a></li> |
112 |
<li·title="Adding·a·Child·Process"><a·href="sup_princ.html#idm1 |
112 | <li·title="Adding·a·Child·Process"><a·href="sup_princ.html#idm140231008242208">Adding·a·Child·Process</a></li> |
113 |
<li·title="Stopping·a·Child·Process"><a·href="sup_princ.html#idm1 |
113 | <li·title="Stopping·a·Child·Process"><a·href="sup_princ.html#idm140231008237824">Stopping·a·Child·Process</a></li> |
114 |
<li·title="Simple-One-For-One·Supervisors"><a·href="sup_princ.html#idm1 |
114 | <li·title="Simple-One-For-One·Supervisors"><a·href="sup_princ.html#idm140231008233024">Simple-One-For-One·Supervisors</a></li> |
115 |
<li·title="Stopping"><a·href="sup_princ.html#idm1 |
115 | <li·title="Stopping"><a·href="sup_princ.html#idm140231008218080">Stopping</a></li> |
116 | </ul> | 116 | </ul> |
117 | </li> | 117 | </li> |
118 | <li·id="no"·title="Sys·and·Proc_Lib"·expanded="false">Sys·and·Proc_Lib<ul> | 118 | <li·id="no"·title="Sys·and·Proc_Lib"·expanded="false">Sys·and·Proc_Lib<ul> |
119 | <li><a·href="spec_proc.html"> | 119 | <li><a·href="spec_proc.html"> |
120 | ··············Top·of·chapter | 120 | ··············Top·of·chapter |
121 | ············</a></li> | 121 | ············</a></li> |
122 |
<li·title="Simple·Debugging"><a·href="spec_proc.html#idm1 |
122 | <li·title="Simple·Debugging"><a·href="spec_proc.html#idm140231008206384">Simple·Debugging</a></li> |
123 |
<li·title="Special·Processes"><a·href="spec_proc.html#idm1 |
123 | <li·title="Special·Processes"><a·href="spec_proc.html#idm140231008196256">Special·Processes</a></li> |
124 |
<li·title="User-Defined·Behaviours"><a·href="spec_proc.html#idm1 |
124 | <li·title="User-Defined·Behaviours"><a·href="spec_proc.html#idm140231008119008">User-Defined·Behaviours</a></li> |
125 | </ul> | 125 | </ul> |
126 | </li> | 126 | </li> |
127 | <li·id="loadscrollpos"·title="Applications"·expanded="true">Applications<ul> | 127 | <li·id="loadscrollpos"·title="Applications"·expanded="true">Applications<ul> |
128 | <li><a·href="applications.html"> | 128 | <li><a·href="applications.html"> |
129 | ··············Top·of·chapter | 129 | ··············Top·of·chapter |
130 | ············</a></li> | 130 | ············</a></li> |
131 |
<li·title="Application·Concept"><a·href="applications.html#idm1 |
131 | <li·title="Application·Concept"><a·href="applications.html#idm140231008095264">Application·Concept</a></li> |
132 |
<li·title="Application·Callback·Module"><a·href="applications.html#idm1 |
132 | <li·title="Application·Callback·Module"><a·href="applications.html#idm140231008087216">Application·Callback·Module</a></li> |
133 |
<li·title="Application·Resource·File"><a·href="applications.html#idm1 |
133 | <li·title="Application·Resource·File"><a·href="applications.html#idm140231008073536">Application·Resource·File</a></li> |
134 |
<li·title="Directory·Structure"><a·href="applications.html#idm1 |
134 | <li·title="Directory·Structure"><a·href="applications.html#idm140231008043200">Directory·Structure</a></li> |
135 |
<li·title="Application·Controller"><a·href="applications.html#idm1 |
135 | <li·title="Application·Controller"><a·href="applications.html#idm140231008028064">Application·Controller</a></li> |
136 |
<li·title="Loading·and·Unloading·Applications"><a·href="applications.html#idm1 |
136 | <li·title="Loading·and·Unloading·Applications"><a·href="applications.html#idm140231008024128">Loading·and·Unloading·Applications</a></li> |
137 |
<li·title="Starting·and·Stopping·Applications"><a·href="applications.html#idm1 |
137 | <li·title="Starting·and·Stopping·Applications"><a·href="applications.html#idm140231008016672">Starting·and·Stopping·Applications</a></li> |
138 |
<li·title="Configuring·an·Application"><a·href="applications.html#idm1 |
138 | <li·title="Configuring·an·Application"><a·href="applications.html#idm140231008006160">Configuring·an·Application</a></li> |
139 |
<li·title="Application·Start·Types"><a·href="applications.html#idm1 |
139 | <li·title="Application·Start·Types"><a·href="applications.html#idm140231007982224">Application·Start·Types</a></li> |
140 | </ul> | 140 | </ul> |
141 | </li> | 141 | </li> |
142 | <li·id="no"·title="Included·Applications"·expanded="false">Included·Applications<ul> | 142 | <li·id="no"·title="Included·Applications"·expanded="false">Included·Applications<ul> |
143 | <li><a·href="included_applications.html"> | 143 | <li><a·href="included_applications.html"> |
144 | ··············Top·of·chapter | 144 | ··············Top·of·chapter |
145 | ············</a></li> | 145 | ············</a></li> |
146 |
<li·title="Definition"><a·href="included_applications.html#idm1 |
146 | <li·title="Definition"><a·href="included_applications.html#idm140231007965456">Definition</a></li> |
147 |
<li·title="Specifying·Included·Applications"><a·href="included_applications.html#idm1 |
147 | <li·title="Specifying·Included·Applications"><a·href="included_applications.html#idm140231007957600">Specifying·Included·Applications</a></li> |
148 |
<li·title="Synchronizing·Processes·During·Startup"><a·href="included_applications.html#idm1 |
148 | <li·title="Synchronizing·Processes·During·Startup"><a·href="included_applications.html#idm140231007954560">Synchronizing·Processes·During·Startup</a></li> |
149 | </ul> | 149 | </ul> |
150 | </li> | 150 | </li> |
151 | <li·id="no"·title="Distributed·Applications"·expanded="false">Distributed·Applications<ul> | 151 | <li·id="no"·title="Distributed·Applications"·expanded="false">Distributed·Applications<ul> |
152 | <li><a·href="distributed_applications.html"> | 152 | <li><a·href="distributed_applications.html"> |
153 | ··············Top·of·chapter | 153 | ··············Top·of·chapter |
154 | ············</a></li> | 154 | ············</a></li> |
155 |
<li·title="Definition"><a·href="distributed_applications.html#idm1 |
155 | <li·title="Definition"><a·href="distributed_applications.html#idm140231007928960">Definition</a></li> |
156 |
<li·title="Specifying·Distributed·Applications"><a·href="distributed_applications.html#idm1 |
156 | <li·title="Specifying·Distributed·Applications"><a·href="distributed_applications.html#idm140231007924640">Specifying·Distributed·Applications</a></li> |
157 |
<li·title="Starting·and·Stopping·Distributed·Applications"><a·href="distributed_applications.html#idm1 |
157 | <li·title="Starting·and·Stopping·Distributed·Applications"><a·href="distributed_applications.html#idm140231007899872">Starting·and·Stopping·Distributed·Applications</a></li> |
158 |
<li·title="Failover"><a·href="distributed_applications.html#idm1 |
158 | <li·title="Failover"><a·href="distributed_applications.html#idm140231007887632">Failover</a></li> |
159 |
<li·title="Takeover"><a·href="distributed_applications.html#idm1 |
159 | <li·title="Takeover"><a·href="distributed_applications.html#idm140231007870560">Takeover</a></li> |
160 | </ul> | 160 | </ul> |
161 | </li> | 161 | </li> |
162 | <li·id="no"·title="Releases"·expanded="false">Releases<ul> | 162 | <li·id="no"·title="Releases"·expanded="false">Releases<ul> |
163 | <li><a·href="release_structure.html"> | 163 | <li><a·href="release_structure.html"> |
164 | ··············Top·of·chapter | 164 | ··············Top·of·chapter |
165 | ············</a></li> | 165 | ············</a></li> |
166 |
<li·title="Release·Concept"><a·href="release_structure.html#idm1 |
166 | <li·title="Release·Concept"><a·href="release_structure.html#idm140231007847120">Release·Concept</a></li> |
167 |
<li·title="Release·Resource·File"><a·href="release_structure.html#idm1 |
167 | <li·title="Release·Resource·File"><a·href="release_structure.html#idm140231007840816">Release·Resource·File</a></li> |
168 |
<li·title="Generating·Boot·Scripts"><a·href="release_structure.html#idm1 |
168 | <li·title="Generating·Boot·Scripts"><a·href="release_structure.html#idm140231007823104">Generating·Boot·Scripts</a></li> |
169 |
<li·title="Creating·a·Release·Package"><a·href="release_structure.html#idm1 |
169 | <li·title="Creating·a·Release·Package"><a·href="release_structure.html#idm140231007811840">Creating·a·Release·Package</a></li> |
170 |
<li·title="Directory·Structure"><a·href="release_structure.html#idm1 |
170 | <li·title="Directory·Structure"><a·href="release_structure.html#idm140231007794016">Directory·Structure</a></li> |
171 | </ul> | 171 | </ul> |
172 | </li> | 172 | </li> |
173 | <li·id="no"·title="Release·Handling"·expanded="false">Release·Handling<ul> | 173 | <li·id="no"·title="Release·Handling"·expanded="false">Release·Handling<ul> |
174 | <li><a·href="release_handling.html"> | 174 | <li><a·href="release_handling.html"> |
175 | ··············Top·of·chapter | 175 | ··············Top·of·chapter |
176 | ············</a></li> | 176 | ············</a></li> |
177 |
<li·title="Release·Handling·Principles"><a·href="release_handling.html#idm1 |
177 | <li·title="Release·Handling·Principles"><a·href="release_handling.html#idm140231007763648">Release·Handling·Principles</a></li> |
178 |
<li·title="Requirements"><a·href="release_handling.html#idm1 |
178 | <li·title="Requirements"><a·href="release_handling.html#idm140231007734288">Requirements</a></li> |
179 |
<li·title="Distributed·Systems"><a·href="release_handling.html#idm1 |
179 | <li·title="Distributed·Systems"><a·href="release_handling.html#idm140231007723152">Distributed·Systems</a></li> |
180 |
<li·title="Release·Handling·Instructions"><a·href="release_handling.html#idm1 |
180 | <li·title="Release·Handling·Instructions"><a·href="release_handling.html#idm140231007719984">Release·Handling·Instructions</a></li> |
181 |
<li·title="Application·Upgrade·File"><a·href="release_handling.html#idm1 |
181 | <li·title="Application·Upgrade·File"><a·href="release_handling.html#idm140231007656768">Application·Upgrade·File</a></li> |
182 |
<li·title="Release·Upgrade·File"><a·href="release_handling.html#idm1 |
182 | <li·title="Release·Upgrade·File"><a·href="release_handling.html#idm140231007634928">Release·Upgrade·File</a></li> |
183 |
<li·title="Installing·a·Release"><a·href="release_handling.html#idm1 |
183 | <li·title="Installing·a·Release"><a·href="release_handling.html#idm140231007616192">Installing·a·Release</a></li> |
184 |
<li·title="Updating·Application·Specifications"><a·href="release_handling.html#idm1 |
184 | <li·title="Updating·Application·Specifications"><a·href="release_handling.html#idm140231007559712">Updating·Application·Specifications</a></li> |
185 | </ul> | 185 | </ul> |
186 | </li> | 186 | </li> |
187 | <li·id="no"·title="Appup·Cookbook"·expanded="false">Appup·Cookbook<ul> | 187 | <li·id="no"·title="Appup·Cookbook"·expanded="false">Appup·Cookbook<ul> |
188 | <li><a·href="appup_cookbook.html"> | 188 | <li><a·href="appup_cookbook.html"> |
189 | ··············Top·of·chapter | 189 | ··············Top·of·chapter |
190 | ············</a></li> | 190 | ············</a></li> |
191 |
<li·title="Changing·a·Functional·Module"><a·href="appup_cookbook.html#idm1 |
191 | <li·title="Changing·a·Functional·Module"><a·href="appup_cookbook.html#idm140231007537632">Changing·a·Functional·Module</a></li> |
192 |
<li·title="Changing·a·Residence·Module"><a·href="appup_cookbook.html#idm1 |
192 | <li·title="Changing·a·Residence·Module"><a·href="appup_cookbook.html#idm140231007534896">Changing·a·Residence·Module</a></li> |
193 |
<li·title="Changing·a·Callback·Module"><a·href="appup_cookbook.html#idm1 |
193 | <li·title="Changing·a·Callback·Module"><a·href="appup_cookbook.html#idm140231007530240">Changing·a·Callback·Module</a></li> |
194 |
<li·title="Changing·Internal·State"><a·href="appup_cookbook.html#idm1 |
194 | <li·title="Changing·Internal·State"><a·href="appup_cookbook.html#idm140231007524112">Changing·Internal·State</a></li> |
195 |
<li·title="Module·Dependencies"><a·href="appup_cookbook.html#idm1 |
195 | <li·title="Module·Dependencies"><a·href="appup_cookbook.html#idm140231007507968">Module·Dependencies</a></li> |
196 |
<li·title="Changing·Code·For·a·Special·Process"><a·href="appup_cookbook.html#idm1 |
196 | <li·title="Changing·Code·For·a·Special·Process"><a·href="appup_cookbook.html#idm140231007487488">Changing·Code·For·a·Special·Process</a></li> |
197 |
<li·title="Changing·a·Supervisor"><a·href="appup_cookbook.html#idm1 |
197 | <li·title="Changing·a·Supervisor"><a·href="appup_cookbook.html#idm140231007467472">Changing·a·Supervisor</a></li> |
198 |
<li·title="Adding·or·Deleting·a·Module"><a·href="appup_cookbook.html#idm1 |
198 | <li·title="Adding·or·Deleting·a·Module"><a·href="appup_cookbook.html#idm140231007437968">Adding·or·Deleting·a·Module</a></li> |
199 |
<li·title="Starting·or·Terminating·a·Process"><a·href="appup_cookbook.html#idm1 |
199 | <li·title="Starting·or·Terminating·a·Process"><a·href="appup_cookbook.html#idm140231007434928">Starting·or·Terminating·a·Process</a></li> |
200 |
<li·title="Adding·or·Removing·an·Application"><a·href="appup_cookbook.html#idm1 |
200 | <li·title="Adding·or·Removing·an·Application"><a·href="appup_cookbook.html#idm140231007432704">Adding·or·Removing·an·Application</a></li> |
201 |
<li·title="Restarting·an·Application"><a·href="appup_cookbook.html#idm1 |
201 | <li·title="Restarting·an·Application"><a·href="appup_cookbook.html#idm140231007429024">Restarting·an·Application</a></li> |
202 |
<li·title="Changing·an·Application·Specification"><a·href="appup_cookbook.html#idm1 |
202 | <li·title="Changing·an·Application·Specification"><a·href="appup_cookbook.html#idm140231007423968">Changing·an·Application·Specification</a></li> |
203 |
<li·title="Changing·Application·Configuration"><a·href="appup_cookbook.html#idm1 |
203 | <li·title="Changing·Application·Configuration"><a·href="appup_cookbook.html#idm140231007421104">Changing·Application·Configuration</a></li> |
204 |
<li·title="Changing·Included·Applications"><a·href="appup_cookbook.html#idm1 |
204 | <li·title="Changing·Included·Applications"><a·href="appup_cookbook.html#idm140231007417088">Changing·Included·Applications</a></li> |
205 |
<li·title="Changing·Non-Erlang·Code"><a·href="appup_cookbook.html#idm1 |
205 | <li·title="Changing·Non-Erlang·Code"><a·href="appup_cookbook.html#idm140231007388304">Changing·Non-Erlang·Code</a></li> |
206 |
<li·title="Emulator·Restart·and·Upgrade"><a·href="appup_cookbook.html#idm1 |
206 | <li·title="Emulator·Restart·and·Upgrade"><a·href="appup_cookbook.html#idm140231007378160">Emulator·Restart·and·Upgrade</a></li> |
207 |
<li·title="Emulator·Upgrade·from·pre·OTP·R15"><a·href="appup_cookbook.html#idm1 |
207 | <li·title="Emulator·Upgrade·from·pre·OTP·R15"><a·href="appup_cookbook.html#idm140231007368976">Emulator·Upgrade·from·pre·OTP·R15</a></li> |
208 | </ul> | 208 | </ul> |
209 | </li> | 209 | </li> |
210 | </ul> | 210 | </ul> |
211 | </div></div> | 211 | </div></div> |
212 | <div·id="content"> | 212 | <div·id="content"> |
213 | <div·class="innertube"> | 213 | <div·class="innertube"> |
214 | <h1>7 Applications</h1> | 214 | <h1>7 Applications</h1> |
215 | ·· | 215 | ·· |
216 | ··<a·name="appl"></a> | 216 | ··<a·name="appl"></a> |
217 | ··<p>This·chapter·should·be·read·in·conjunction·with·<span·class="code">app(4)</span>·and | 217 | ··<p>This·chapter·should·be·read·in·conjunction·with·<span·class="code">app(4)</span>·and |
218 | ····<span·class="code">application(3)</span>.</p> | 218 | ····<span·class="code">application(3)</span>.</p> |
219 |
··<h3><a·name="idm1 |
219 | ··<h3><a·name="idm140231008095264">7.1 |
220 | ········Application·Concept</a></h3> | 220 | ········Application·Concept</a></h3> |
221 | ···· | 221 | ···· |
222 | ····<p>When·we·have·written·code·implementing·some·specific | 222 | ····<p>When·we·have·written·code·implementing·some·specific |
223 | ······functionality,·we·might·want·to·make·the·code·into·an | 223 | ······functionality,·we·might·want·to·make·the·code·into·an |
224 | ······<strong>application</strong>,·that·is·a·component·that·can·be·started·and | 224 | ······<strong>application</strong>,·that·is·a·component·that·can·be·started·and |
225 | ······stopped·as·a·unit,·and·which·can·be·re-used·in·other·systems·as | 225 | ······stopped·as·a·unit,·and·which·can·be·re-used·in·other·systems·as |
226 | ······well.</p> | 226 | ······well.</p> |
Offset 234, 15 lines modified | Offset 234, 15 lines modified | ||
234 | ······module.</p> | 234 | ······module.</p> |
235 | ····<p>If·we·use·<span·class="code">systools</span>,·the·Erlang/OTP·tools·for·packaging·code | 235 | ····<p>If·we·use·<span·class="code">systools</span>,·the·Erlang/OTP·tools·for·packaging·code |
236 | ······(see·<span·class="bold_code"><a·href="release_structure.html">Releases</a></span>), | 236 | ······(see·<span·class="bold_code"><a·href="release_structure.html">Releases</a></span>), |
237 | ······the·code·for·each·application·is·placed·in·a·separate·directory | 237 | ······the·code·for·each·application·is·placed·in·a·separate·directory |
238 | ······following·a·pre-defined·<span·class="bold_code"><a·href="#app_dir">directory·structure</a></span>.</p> | 238 | ······following·a·pre-defined·<span·class="bold_code"><a·href="#app_dir">directory·structure</a></span>.</p> |
239 | ·· | 239 | ·· |
240 |
··<h3><a·name="idm1 |
240 | ··<h3><a·name="idm140231008087216">7.2 |
241 | ········Application·Callback·Module</a></h3> | 241 | ········Application·Callback·Module</a></h3> |
242 | ····<a·name="callback_module"></a> | 242 | ····<a·name="callback_module"></a> |
243 | ···· | 243 | ···· |
244 | ····<p>How·to·start·and·stop·the·code·for·the·application,·i.e. | 244 | ····<p>How·to·start·and·stop·the·code·for·the·application,·i.e. |
245 | ······the·supervision·tree,·is·described·by·two·callback·functions:</p> | 245 | ······the·supervision·tree,·is·described·by·two·callback·functions:</p> |
246 | ····<div·class="example"><pre> | 246 | ····<div·class="example"><pre> |
247 | start(StartType,·StartArgs)·->·{ok,·Pid}·|·{ok,·Pid,·State} | 247 | start(StartType,·StartArgs)·->·{ok,·Pid}·|·{ok,·Pid,·State} |
Offset 276, 15 lines modified | Offset 276, 15 lines modified | ||
276 | stop(_State)·-> | 276 | stop(_State)·-> |
277 | ····ok.</pre></div> | 277 | ····ok.</pre></div> |
278 | ····<p>A·library·application,·which·can·not·be·started·or·stopped, | 278 | ····<p>A·library·application,·which·can·not·be·started·or·stopped, |
279 | ······does·not·need·any·application·callback·module.</p> | 279 | ······does·not·need·any·application·callback·module.</p> |
280 | ·· | 280 | ·· |
281 |
··<h3><a·name="idm1 |
281 | ··<h3><a·name="idm140231008073536">7.3 |
282 | ········Application·Resource·File</a></h3> | 282 | ········Application·Resource·File</a></h3> |
283 | ····<a·name="appl_res_file"></a> | 283 | ····<a·name="appl_res_file"></a> |
284 | ···· | 284 | ···· |
285 | ····<p>To·define·an·application,·we·create·an·<strong>application·specification</strong>·which·is·put·in·an·<strong>application·resource·file</strong>,·or·in·short·<span·class="code">.app</span>·file:</p> | 285 | ····<p>To·define·an·application,·we·create·an·<strong>application·specification</strong>·which·is·put·in·an·<strong>application·resource·file</strong>,·or·in·short·<span·class="code">.app</span>·file:</p> |
286 | ····<div·class="example"><pre> | 286 | ····<div·class="example"><pre> |
287 | {application,·Application,·[Opt1,...,OptN]}.</pre></div> | 287 | {application,·Application,·[Opt1,...,OptN]}.</pre></div> |
288 | ····<p><span·class="code">Application</span>,·an·atom,·is·the·name·of·the·application. | 288 | ····<p><span·class="code">Application</span>,·an·atom,·is·the·name·of·the·application. |
Offset 349, 15 lines modified | Offset 349, 15 lines modified | ||
349 | <div·class="label">Note</div> | 349 | <div·class="label">Note</div> |
350 | <div·class="content"><p><p>The·syntax·and·contents·of·of·the·application·resource·file | 350 | <div·class="content"><p><p>The·syntax·and·contents·of·of·the·application·resource·file |
351 | ······are·described·in·detail·in·the<span·class="bold_code"><a·href="javascript:erlhref('../../','kernel','app.html');"> | 351 | ······are·described·in·detail·in·the<span·class="bold_code"><a·href="javascript:erlhref('../../','kernel','app.html');"> |
352 | ······Application·resource·file·reference</a></span>.</p></p></div> | 352 | ······Application·resource·file·reference</a></span>.</p></p></div> |
353 | </div> | 353 | </div> |
354 | ·· | 354 | ·· |
355 |
··<h3><a·name="idm1 |
355 | ··<h3><a·name="idm140231008043200">7.4 |
356 | ········Directory·Structure</a></h3> | 356 | ········Directory·Structure</a></h3> |
357 | ····<a·name="app_dir"></a> | 357 | ····<a·name="app_dir"></a> |
358 | ···· | 358 | ···· |
359 | ····<p>When·packaging·code·using·<span·class="code">systools</span>,·the·code·for·each | 359 | ····<p>When·packaging·code·using·<span·class="code">systools</span>,·the·code·for·each |
360 | ······application·is·placed·in·a·separate·directory | 360 | ······application·is·placed·in·a·separate·directory |
361 | ······<span·class="code">lib/Application-Vsn</span>,·where·<span·class="code">Vsn</span>·is·the·version·number.</p> | 361 | ······<span·class="code">lib/Application-Vsn</span>,·where·<span·class="code">Vsn</span>·is·the·version·number.</p> |
362 | ····<p>This·may·be·useful·to·know,·even·if·<span·class="code">systools</span>·is·not·used, | 362 | ····<p>This·may·be·useful·to·know,·even·if·<span·class="code">systools</span>·is·not·used, |
Offset 387, 30 lines modified | Offset 387, 30 lines modified | ||
387 | ·······executables·are·placed·here.·The·function·<span·class="code">code:priv_dir/1</span> | 387 | ·······executables·are·placed·here.·The·function·<span·class="code">code:priv_dir/1</span> |
388 | ·······should·be·used·to·access·this·directory.</dd> | 388 | ·······should·be·used·to·access·this·directory.</dd> |
389 | ······<dt><strong><span·class="code">include</span></strong></dt> | 389 | ······<dt><strong><span·class="code">include</span></strong></dt> |
390 | ······<dd>Used·for·include·files.</dd> | 390 | ······<dd>Used·for·include·files.</dd> |
391 | ····</dl> | 391 | ····</dl> |
392 | ·· | 392 | ·· |
393 |
··<h3><a·name="idm1 |
393 | ··<h3><a·name="idm140231008028064">7.5 |
394 | ········Application·Controller</a></h3> | 394 | ········Application·Controller</a></h3> |
395 | ····<a·name="application_controller"></a> | 395 | ····<a·name="application_controller"></a> |
396 | ···· | 396 | ···· |
397 | ····<p>When·an·Erlang·runtime·system·is·started,·a·number·of·processes | 397 | ····<p>When·an·Erlang·runtime·system·is·started,·a·number·of·processes |
398 | ······are·started·as·part·of·the·Kernel·application.·One·of·these | 398 | ······are·started·as·part·of·the·Kernel·application.·One·of·these |
399 | ······processes·is·the·<strong>application·controller</strong>·process, | 399 | ······processes·is·the·<strong>application·controller</strong>·process, |
400 | ······registered·as·<span·class="code">application_controller</span>.</p> | 400 | ······registered·as·<span·class="code">application_controller</span>.</p> |
401 | ····<p>All·operations·on·applications·are·coordinated·by·the·application | 401 | ····<p>All·operations·on·applications·are·coordinated·by·the·application |
402 | ······controller.·It·is·interfaced·through·the·functions·in | 402 | ······controller.·It·is·interfaced·through·the·functions·in |
403 | ······the·module·<span·class="code">application</span>,·see·<span·class="code">application(3)</span>. | 403 | ······the·module·<span·class="code">application</span>,·see·<span·class="code">application(3)</span>. |
404 | ······In·particular,·applications·can·be·loaded,·unloaded,·started·and | 404 | ······In·particular,·applications·can·be·loaded,·unloaded,·started·and |
405 | ······stopped.</p> | 405 | ······stopped.</p> |
406 | ·· | 406 | ·· |
407 |
··<h3><a·name="idm1 |
407 | ··<h3><a·name="idm140231008024128">7.6 |
408 | ········Loading·and·Unloading·Applications</a></h3> | 408 | ········Loading·and·Unloading·Applications</a></h3> |
409 | ···· | 409 | ···· |
410 | ····<p>Before·an·application·can·be·started,·it·must·be·<strong>loaded</strong>. | 410 | ····<p>Before·an·application·can·be·started,·it·must·be·<strong>loaded</strong>. |
411 | ······The·application·controller·reads·and·stores·the·information·from | 411 | ······The·application·controller·reads·and·stores·the·information·from |
412 | ······the·<span·class="code">.app</span>·file.</p> | 412 | ······the·<span·class="code">.app</span>·file.</p> |
413 | ····<div·class="example"><pre> | 413 | ····<div·class="example"><pre> |
414 | 1>·<span·class="bold_code">application:load(ch_app).</span> | 414 | 1>·<span·class="bold_code">application:load(ch_app).</span> |
Offset 433, 15 lines modified | Offset 433, 15 lines modified | ||
433 | <div·class="content"><p> | 433 | <div·class="content"><p> |
434 | ······<p>Loading/unloading·an·application·does·not·load/unload·the·code | 434 | ······<p>Loading/unloading·an·application·does·not·load/unload·the·code |
435 | ········used·by·the·application.·Code·loading·is·done·the·usual·way.</p> | 435 | ········used·by·the·application.·Code·loading·is·done·the·usual·way.</p> |
436 | ····</p></div> | 436 | ····</p></div> |
437 | </div> | 437 | </div> |
438 | ·· | 438 | ·· |
439 |
··<h3><a·name="idm1 |
439 | ··<h3><a·name="idm140231008016672">7.7 |
440 | ········Starting·and·Stopping·Applications</a></h3> | 440 | ········Starting·and·Stopping·Applications</a></h3> |
441 | ····<a·name="stopping"></a> | 441 | ····<a·name="stopping"></a> |
442 | ···· | 442 | ···· |
443 | ····<p>An·application·is·started·by·calling:</p> | 443 | ····<p>An·application·is·started·by·calling:</p> |
444 | ····<div·class="example"><pre> | 444 | ····<div·class="example"><pre> |
445 | 5>·<span·class="bold_code">application:start(ch_app).</span> | 445 | 5>·<span·class="bold_code">application:start(ch_app).</span> |
446 | ok | 446 | ok |
Offset 469, 15 lines modified | Offset 469, 15 lines modified | ||
469 | ······supervisor·to·shutdown.·The·top·supervisor·tells·all·its·child | 469 | ······supervisor·to·shutdown.·The·top·supervisor·tells·all·its·child |
470 | ······processes·to·shutdown·etc.·and·the·entire·tree·is·terminated·in | 470 | ······processes·to·shutdown·etc.·and·the·entire·tree·is·terminated·in |
471 | ······reversed·start·order.·The·application·master·then·calls | 471 | ······reversed·start·order.·The·application·master·then·calls |
472 | ······the·application·callback·function·<span·class="code">stop/1</span>·in·the·module | 472 | ······the·application·callback·function·<span·class="code">stop/1</span>·in·the·module |
473 | ······defined·by·the·<span·class="code">mod</span>·key.</p> | 473 | ······defined·by·the·<span·class="code">mod</span>·key.</p> |
474 | ·· | 474 | ·· |
475 |
··<h3><a·name="idm1 |
475 | ··<h3><a·name="idm140231008006160">7.8 |
476 | ········Configuring·an·Application</a></h3> | 476 | ········Configuring·an·Application</a></h3> |
477 | ···· | 477 | ···· |
478 | ····<p>An·application·can·be·configured·using·<strong>configuration·parameters</strong>.·These·are·a·list·of·<span·class="code">{Par,·Val}</span>·tuples | 478 | ····<p>An·application·can·be·configured·using·<strong>configuration·parameters</strong>.·These·are·a·list·of·<span·class="code">{Par,·Val}</span>·tuples |
479 | ······specified·by·a·key·<span·class="code">env</span>·in·the·<span·class="code">.app</span>·file.</p> | 479 | ······specified·by·a·key·<span·class="code">env</span>·in·the·<span·class="code">.app</span>·file.</p> |
480 | ····<div·class="example"><pre> | 480 | ····<div·class="example"><pre> |
481 | {application,·ch_app, | 481 | {application,·ch_app, |
482 | ·[{description,·"Channel·allocator"}, | 482 | ·[{description,·"Channel·allocator"}, |
Offset 544, 15 lines modified | Offset 544, 15 lines modified | ||
544 | Eshell·V5.2.3.6··(abort·with·^G) | 544 | Eshell·V5.2.3.6··(abort·with·^G) |
545 | 1>·<span·class="bold_code">application:start(ch_app).</span> | 545 | 1>·<span·class="bold_code">application:start(ch_app).</span> |
546 | ok | 546 | ok |
547 | 2>·<span·class="bold_code">application:get_env(ch_app,·file).</span> | 547 | 2>·<span·class="bold_code">application:get_env(ch_app,·file).</span> |
548 | {ok,"testlog"}</pre></div> | 548 | {ok,"testlog"}</pre></div> |
549 | ·· | 549 | ·· |
550 |
··<h3><a·name="idm1 |
550 | ··<h3><a·name="idm140231007982224">7.9 |
551 | ········Application·Start·Types</a></h3> | 551 | ········Application·Start·Types</a></h3> |
552 | ···· | 552 | ···· |
553 | ····<p>A·<strong>start·type</strong>·is·defined·when·starting·the·application:</p> | 553 | ····<p>A·<strong>start·type</strong>·is·defined·when·starting·the·application:</p> |
554 | ····<div·class="example"><pre> | 554 | ····<div·class="example"><pre> |
555 | application:start(Application,·Type)</pre></div> | 555 | application:start(Application,·Type)</pre></div> |
556 | ····<p><span·class="code">application:start(Application)</span>·is·the·same·as·calling | 556 | ····<p><span·class="code">application:start(Application)</span>·is·the·same·as·calling |
557 | ······<span·class="code">application:start(Application,·temporary)</span>.·The·type·can | 557 | ······<span·class="code">application:start(Application,·temporary)</span>.·The·type·can |
Offset 47, 207 lines modified | Offset 47, 207 lines modified | ||
47 | <img·alt="Erlang·logo"·src="../erlang-logo.png"><br><small><a·href="users_guide.html">User's·Guide</a><br><a·href="../pdf/otp-system-documentation-6.3.pdf">PDF</a><br><a·href="../index.html">Top</a></small><p><strong>OTP·Design·Principles</strong><br><strong>User's·Guide</strong><br><small>Version·6.3</small></p> | 47 | <img·alt="Erlang·logo"·src="../erlang-logo.png"><br><small><a·href="users_guide.html">User's·Guide</a><br><a·href="../pdf/otp-system-documentation-6.3.pdf">PDF</a><br><a·href="../index.html">Top</a></small><p><strong>OTP·Design·Principles</strong><br><strong>User's·Guide</strong><br><small>Version·6.3</small></p> |
48 | <br><a·href="javascript:openAllFlips()">Expand·All</a><br><a·href="javascript:closeAllFlips()">Contract·All</a><p><small><strong>Chapters</strong></small></p> | 48 | <br><a·href="javascript:openAllFlips()">Expand·All</a><br><a·href="javascript:closeAllFlips()">Contract·All</a><p><small><strong>Chapters</strong></small></p> |
49 | <ul·class="flipMenu"·imagepath="../js/flipmenu"> | 49 | <ul·class="flipMenu"·imagepath="../js/flipmenu"> |
50 | <li·id="no"·title="Overview"·expanded="false">Overview<ul> | 50 | <li·id="no"·title="Overview"·expanded="false">Overview<ul> |
51 | <li><a·href="des_princ.html"> | 51 | <li><a·href="des_princ.html"> |
52 | ··············Top·of·chapter | 52 | ··············Top·of·chapter |
53 | ············</a></li> | 53 | ············</a></li> |
54 |
<li·title="Supervision·Trees"><a·href="des_princ.html#idm1 |
54 | <li·title="Supervision·Trees"><a·href="des_princ.html#idm140231008664592">Supervision·Trees</a></li> |
55 |
<li·title="Behaviours"><a·href="des_princ.html#idm1 |
55 | <li·title="Behaviours"><a·href="des_princ.html#idm140231008672688">Behaviours</a></li> |
56 |
<li·title="Applications"><a·href="des_princ.html#idm1 |
56 | <li·title="Applications"><a·href="des_princ.html#idm140231008752016">Applications</a></li> |
57 |
<li·title="Releases"><a·href="des_princ.html#idm1 |
57 | <li·title="Releases"><a·href="des_princ.html#idm140231008757072">Releases</a></li> |
58 |
<li·title="Release·Handling"><a·href="des_princ.html#idm1 |
58 | <li·title="Release·Handling"><a·href="des_princ.html#idm140231008760592">Release·Handling</a></li> |
59 | </ul> | 59 | </ul> |
60 | </li> | 60 | </li> |
61 | <li·id="no"·title="Gen_Server·Behaviour"·expanded="false">Gen_Server·Behaviour<ul> | 61 | <li·id="no"·title="Gen_Server·Behaviour"·expanded="false">Gen_Server·Behaviour<ul> |
62 | <li><a·href="gen_server_concepts.html"> | 62 | <li><a·href="gen_server_concepts.html"> |
63 | ··············Top·of·chapter | 63 | ··············Top·of·chapter |
64 | ············</a></li> | 64 | ············</a></li> |
65 |
<li·title="Client-Server·Principles"><a·href="gen_server_concepts.html#idm1 |
65 | <li·title="Client-Server·Principles"><a·href="gen_server_concepts.html#idm140231008770128">Client-Server·Principles</a></li> |
66 |
<li·title="Example"><a·href="gen_server_concepts.html#idm1 |
66 | <li·title="Example"><a·href="gen_server_concepts.html#idm140231008697632">Example</a></li> |
67 |
<li·title="Starting·a·Gen_Server"><a·href="gen_server_concepts.html#idm1 |
67 | <li·title="Starting·a·Gen_Server"><a·href="gen_server_concepts.html#idm140231008702000">Starting·a·Gen_Server</a></li> |
68 |
<li·title="Synchronous·Requests·-·Call"><a·href="gen_server_concepts.html#idm1 |
68 | <li·title="Synchronous·Requests·-·Call"><a·href="gen_server_concepts.html#idm140231008776224">Synchronous·Requests·-·Call</a></li> |
69 |
<li·title="Asynchronous·Requests·-·Cast"><a·href="gen_server_concepts.html#idm1 |
69 | <li·title="Asynchronous·Requests·-·Cast"><a·href="gen_server_concepts.html#idm140231008786432">Asynchronous·Requests·-·Cast</a></li> |
70 |
<li·title="Stopping"><a·href="gen_server_concepts.html#idm1 |
70 | <li·title="Stopping"><a·href="gen_server_concepts.html#idm140231009075376">Stopping</a></li> |
71 |
<li·title="Handling·Other·Messages"><a·href="gen_server_concepts.html#idm1 |
71 | <li·title="Handling·Other·Messages"><a·href="gen_server_concepts.html#idm140231008621744">Handling·Other·Messages</a></li> |
72 | </ul> | 72 | </ul> |
73 | </li> | 73 | </li> |
74 | <li·id="no"·title="Gen_Fsm·Behaviour"·expanded="false">Gen_Fsm·Behaviour<ul> | 74 | <li·id="no"·title="Gen_Fsm·Behaviour"·expanded="false">Gen_Fsm·Behaviour<ul> |
75 | <li><a·href="fsm.html"> | 75 | <li><a·href="fsm.html"> |
76 | ··············Top·of·chapter | 76 | ··············Top·of·chapter |
77 | ············</a></li> | 77 | ············</a></li> |
78 |
<li·title="Finite·State·Machines"><a·href="fsm.html#idm1 |
78 | <li·title="Finite·State·Machines"><a·href="fsm.html#idm140231009090752">Finite·State·Machines</a></li> |
79 |
<li·title="Example"><a·href="fsm.html#idm1 |
79 | <li·title="Example"><a·href="fsm.html#idm140231008799248">Example</a></li> |
80 |
<li·title="Starting·a·Gen_Fsm"><a·href="fsm.html#idm1 |
80 | <li·title="Starting·a·Gen_Fsm"><a·href="fsm.html#idm140231009551600">Starting·a·Gen_Fsm</a></li> |
81 |
<li·title="Notifying·About·Events"><a·href="fsm.html#idm1 |
81 | <li·title="Notifying·About·Events"><a·href="fsm.html#idm140231009115360">Notifying·About·Events</a></li> |
82 |
<li·title="Timeouts"><a·href="fsm.html#idm1 |
82 | <li·title="Timeouts"><a·href="fsm.html#idm140231009808544">Timeouts</a></li> |
83 |
<li·title="All·State·Events"><a·href="fsm.html#idm1 |
83 | <li·title="All·State·Events"><a·href="fsm.html#idm140231009303152">All·State·Events</a></li> |
84 |
<li·title="Stopping"><a·href="fsm.html#idm1 |
84 | <li·title="Stopping"><a·href="fsm.html#idm140231008912976">Stopping</a></li> |
85 |
<li·title="Handling·Other·Messages"><a·href="fsm.html#idm1 |
85 | <li·title="Handling·Other·Messages"><a·href="fsm.html#idm140231008432688">Handling·Other·Messages</a></li> |
86 | </ul> | 86 | </ul> |
87 | </li> | 87 | </li> |
88 | <li·id="no"·title="Gen_Event·Behaviour"·expanded="false">Gen_Event·Behaviour<ul> | 88 | <li·id="no"·title="Gen_Event·Behaviour"·expanded="false">Gen_Event·Behaviour<ul> |
89 | <li><a·href="events.html"> | 89 | <li><a·href="events.html"> |
90 | ··············Top·of·chapter | 90 | ··············Top·of·chapter |
91 | ············</a></li> | 91 | ············</a></li> |
92 |
<li·title="Event·Handling·Principles"><a·href="events.html#idm1 |
92 | <li·title="Event·Handling·Principles"><a·href="events.html#idm140231009179392">Event·Handling·Principles</a></li> |
93 |
<li·title="Example"><a·href="events.html#idm1 |
93 | <li·title="Example"><a·href="events.html#idm140231008417152">Example</a></li> |
94 |
<li·title="Starting·an·Event·Manager"><a·href="events.html#idm1 |
94 | <li·title="Starting·an·Event·Manager"><a·href="events.html#idm140231008413136">Starting·an·Event·Manager</a></li> |
95 |
<li·title="Adding·an·Event·Handler"><a·href="events.html#idm1 |
95 | <li·title="Adding·an·Event·Handler"><a·href="events.html#idm140231009388752">Adding·an·Event·Handler</a></li> |
96 |
<li·title="Notifying·About·Events"><a·href="events.html#idm1 |
96 | <li·title="Notifying·About·Events"><a·href="events.html#idm140231008728512">Notifying·About·Events</a></li> |
97 |
<li·title="Deleting·an·Event·Handler"><a·href="events.html#idm1 |
97 | <li·title="Deleting·an·Event·Handler"><a·href="events.html#idm140231008720736">Deleting·an·Event·Handler</a></li> |
98 |
<li·title="Stopping"><a·href="events.html#idm1 |
98 | <li·title="Stopping"><a·href="events.html#idm140231008689408">Stopping</a></li> |
99 |
<li·title="Handling·Other·Messages"><a·href="events.html#idm1 |
99 | <li·title="Handling·Other·Messages"><a·href="events.html#idm140231008683248">Handling·Other·Messages</a></li> |
100 | </ul> | 100 | </ul> |
101 | </li> | 101 | </li> |
102 | <li·id="no"·title="Supervisor·Behaviour"·expanded="false">Supervisor·Behaviour<ul> | 102 | <li·id="no"·title="Supervisor·Behaviour"·expanded="false">Supervisor·Behaviour<ul> |
103 | <li><a·href="sup_princ.html"> | 103 | <li><a·href="sup_princ.html"> |
104 | ··············Top·of·chapter | 104 | ··············Top·of·chapter |
105 | ············</a></li> | 105 | ············</a></li> |
106 |
<li·title="Supervision·Principles"><a·href="sup_princ.html#idm1 |
106 | <li·title="Supervision·Principles"><a·href="sup_princ.html#idm140231008291744">Supervision·Principles</a></li> |
107 |
<li·title="Example"><a·href="sup_princ.html#idm1 |
107 | <li·title="Example"><a·href="sup_princ.html#idm140231009682528">Example</a></li> |
108 |
<li·title="Restart·Strategy"><a·href="sup_princ.html#idm1 |
108 | <li·title="Restart·Strategy"><a·href="sup_princ.html#idm140231009629632">Restart·Strategy</a></li> |
109 |
<li·title="Maximum·Restart·Frequency"><a·href="sup_princ.html#idm1 |
109 | <li·title="Maximum·Restart·Frequency"><a·href="sup_princ.html#idm140231008896368">Maximum·Restart·Frequency</a></li> |
110 |
<li·title="Child·Specification"><a·href="sup_princ.html#idm1 |
110 | <li·title="Child·Specification"><a·href="sup_princ.html#idm140231008285744">Child·Specification</a></li> |
111 |
<li·title="Starting·a·Supervisor"><a·href="sup_princ.html#idm1 |
111 | <li·title="Starting·a·Supervisor"><a·href="sup_princ.html#idm140231008253328">Starting·a·Supervisor</a></li> |
112 |
<li·title="Adding·a·Child·Process"><a·href="sup_princ.html#idm1 |
112 | <li·title="Adding·a·Child·Process"><a·href="sup_princ.html#idm140231008242208">Adding·a·Child·Process</a></li> |
113 |
<li·title="Stopping·a·Child·Process"><a·href="sup_princ.html#idm1 |
113 | <li·title="Stopping·a·Child·Process"><a·href="sup_princ.html#idm140231008237824">Stopping·a·Child·Process</a></li> |
114 |
<li·title="Simple-One-For-One·Supervisors"><a·href="sup_princ.html#idm1 |
114 | <li·title="Simple-One-For-One·Supervisors"><a·href="sup_princ.html#idm140231008233024">Simple-One-For-One·Supervisors</a></li> |
115 |
<li·title="Stopping"><a·href="sup_princ.html#idm1 |
115 | <li·title="Stopping"><a·href="sup_princ.html#idm140231008218080">Stopping</a></li> |
116 | </ul> | 116 | </ul> |
117 | </li> | 117 | </li> |
118 | <li·id="no"·title="Sys·and·Proc_Lib"·expanded="false">Sys·and·Proc_Lib<ul> | 118 | <li·id="no"·title="Sys·and·Proc_Lib"·expanded="false">Sys·and·Proc_Lib<ul> |
119 | <li><a·href="spec_proc.html"> | 119 | <li><a·href="spec_proc.html"> |
120 | ··············Top·of·chapter | 120 | ··············Top·of·chapter |
121 | ············</a></li> | 121 | ············</a></li> |
122 |
<li·title="Simple·Debugging"><a·href="spec_proc.html#idm1 |
122 | <li·title="Simple·Debugging"><a·href="spec_proc.html#idm140231008206384">Simple·Debugging</a></li> |
123 |
<li·title="Special·Processes"><a·href="spec_proc.html#idm1 |
123 | <li·title="Special·Processes"><a·href="spec_proc.html#idm140231008196256">Special·Processes</a></li> |
124 |
<li·title="User-Defined·Behaviours"><a·href="spec_proc.html#idm1 |
124 | <li·title="User-Defined·Behaviours"><a·href="spec_proc.html#idm140231008119008">User-Defined·Behaviours</a></li> |
125 | </ul> | 125 | </ul> |
126 | </li> | 126 | </li> |
127 | <li·id="no"·title="Applications"·expanded="false">Applications<ul> | 127 | <li·id="no"·title="Applications"·expanded="false">Applications<ul> |
128 | <li><a·href="applications.html"> | 128 | <li><a·href="applications.html"> |
129 | ··············Top·of·chapter | 129 | ··············Top·of·chapter |
130 | ············</a></li> | 130 | ············</a></li> |
131 |
<li·title="Application·Concept"><a·href="applications.html#idm1 |
131 | <li·title="Application·Concept"><a·href="applications.html#idm140231008095264">Application·Concept</a></li> |
132 |
<li·title="Application·Callback·Module"><a·href="applications.html#idm1 |
132 | <li·title="Application·Callback·Module"><a·href="applications.html#idm140231008087216">Application·Callback·Module</a></li> |
133 |
<li·title="Application·Resource·File"><a·href="applications.html#idm1 |
133 | <li·title="Application·Resource·File"><a·href="applications.html#idm140231008073536">Application·Resource·File</a></li> |
134 |
<li·title="Directory·Structure"><a·href="applications.html#idm1 |
134 | <li·title="Directory·Structure"><a·href="applications.html#idm140231008043200">Directory·Structure</a></li> |
135 |
<li·title="Application·Controller"><a·href="applications.html#idm1 |
135 | <li·title="Application·Controller"><a·href="applications.html#idm140231008028064">Application·Controller</a></li> |
136 |
<li·title="Loading·and·Unloading·Applications"><a·href="applications.html#idm1 |
136 | <li·title="Loading·and·Unloading·Applications"><a·href="applications.html#idm140231008024128">Loading·and·Unloading·Applications</a></li> |
137 |
<li·title="Starting·and·Stopping·Applications"><a·href="applications.html#idm1 |
137 | <li·title="Starting·and·Stopping·Applications"><a·href="applications.html#idm140231008016672">Starting·and·Stopping·Applications</a></li> |
138 |
<li·title="Configuring·an·Application"><a·href="applications.html#idm1 |
138 | <li·title="Configuring·an·Application"><a·href="applications.html#idm140231008006160">Configuring·an·Application</a></li> |
139 |
<li·title="Application·Start·Types"><a·href="applications.html#idm1 |
139 | <li·title="Application·Start·Types"><a·href="applications.html#idm140231007982224">Application·Start·Types</a></li> |
140 | </ul> | 140 | </ul> |
141 | </li> | 141 | </li> |
142 | <li·id="no"·title="Included·Applications"·expanded="false">Included·Applications<ul> | 142 | <li·id="no"·title="Included·Applications"·expanded="false">Included·Applications<ul> |
143 | <li><a·href="included_applications.html"> | 143 | <li><a·href="included_applications.html"> |
144 | ··············Top·of·chapter | 144 | ··············Top·of·chapter |
145 | ············</a></li> | 145 | ············</a></li> |
146 |
<li·title="Definition"><a·href="included_applications.html#idm1 |
146 | <li·title="Definition"><a·href="included_applications.html#idm140231007965456">Definition</a></li> |
147 |
<li·title="Specifying·Included·Applications"><a·href="included_applications.html#idm1 |
147 | <li·title="Specifying·Included·Applications"><a·href="included_applications.html#idm140231007957600">Specifying·Included·Applications</a></li> |
148 |
<li·title="Synchronizing·Processes·During·Startup"><a·href="included_applications.html#idm1 |
148 | <li·title="Synchronizing·Processes·During·Startup"><a·href="included_applications.html#idm140231007954560">Synchronizing·Processes·During·Startup</a></li> |
149 | </ul> | 149 | </ul> |
150 | </li> | 150 | </li> |
151 | <li·id="no"·title="Distributed·Applications"·expanded="false">Distributed·Applications<ul> | 151 | <li·id="no"·title="Distributed·Applications"·expanded="false">Distributed·Applications<ul> |
152 | <li><a·href="distributed_applications.html"> | 152 | <li><a·href="distributed_applications.html"> |
153 | ··············Top·of·chapter | 153 | ··············Top·of·chapter |
154 | ············</a></li> | 154 | ············</a></li> |
155 |
<li·title="Definition"><a·href="distributed_applications.html#idm1 |
155 | <li·title="Definition"><a·href="distributed_applications.html#idm140231007928960">Definition</a></li> |
156 |
<li·title="Specifying·Distributed·Applications"><a·href="distributed_applications.html#idm1 |
156 | <li·title="Specifying·Distributed·Applications"><a·href="distributed_applications.html#idm140231007924640">Specifying·Distributed·Applications</a></li> |
157 |
<li·title="Starting·and·Stopping·Distributed·Applications"><a·href="distributed_applications.html#idm1 |
157 | <li·title="Starting·and·Stopping·Distributed·Applications"><a·href="distributed_applications.html#idm140231007899872">Starting·and·Stopping·Distributed·Applications</a></li> |
158 |
<li·title="Failover"><a·href="distributed_applications.html#idm1 |
158 | <li·title="Failover"><a·href="distributed_applications.html#idm140231007887632">Failover</a></li> |
159 |
<li·title="Takeover"><a·href="distributed_applications.html#idm1 |
159 | <li·title="Takeover"><a·href="distributed_applications.html#idm140231007870560">Takeover</a></li> |
160 | </ul> | 160 | </ul> |
161 | </li> | 161 | </li> |
162 | <li·id="no"·title="Releases"·expanded="false">Releases<ul> | 162 | <li·id="no"·title="Releases"·expanded="false">Releases<ul> |
163 | <li><a·href="release_structure.html"> | 163 | <li><a·href="release_structure.html"> |
164 | ··············Top·of·chapter | 164 | ··············Top·of·chapter |
165 | ············</a></li> | 165 | ············</a></li> |
166 |
<li·title="Release·Concept"><a·href="release_structure.html#idm1 |
166 | <li·title="Release·Concept"><a·href="release_structure.html#idm140231007847120">Release·Concept</a></li> |
167 |
<li·title="Release·Resource·File"><a·href="release_structure.html#idm1 |
167 | <li·title="Release·Resource·File"><a·href="release_structure.html#idm140231007840816">Release·Resource·File</a></li> |
168 |
<li·title="Generating·Boot·Scripts"><a·href="release_structure.html#idm1 |
168 | <li·title="Generating·Boot·Scripts"><a·href="release_structure.html#idm140231007823104">Generating·Boot·Scripts</a></li> |
169 |
<li·title="Creating·a·Release·Package"><a·href="release_structure.html#idm1 |
169 | <li·title="Creating·a·Release·Package"><a·href="release_structure.html#idm140231007811840">Creating·a·Release·Package</a></li> |
170 |
<li·title="Directory·Structure"><a·href="release_structure.html#idm1 |
170 | <li·title="Directory·Structure"><a·href="release_structure.html#idm140231007794016">Directory·Structure</a></li> |
171 | </ul> | 171 | </ul> |
172 | </li> | 172 | </li> |
173 | <li·id="no"·title="Release·Handling"·expanded="false">Release·Handling<ul> | 173 | <li·id="no"·title="Release·Handling"·expanded="false">Release·Handling<ul> |
174 | <li><a·href="release_handling.html"> | 174 | <li><a·href="release_handling.html"> |
175 | ··············Top·of·chapter | 175 | ··············Top·of·chapter |
176 | ············</a></li> | 176 | ············</a></li> |
177 |
<li·title="Release·Handling·Principles"><a·href="release_handling.html#idm1 |
177 | <li·title="Release·Handling·Principles"><a·href="release_handling.html#idm140231007763648">Release·Handling·Principles</a></li> |
178 |
<li·title="Requirements"><a·href="release_handling.html#idm1 |
178 | <li·title="Requirements"><a·href="release_handling.html#idm140231007734288">Requirements</a></li> |
179 |
<li·title="Distributed·Systems"><a·href="release_handling.html#idm1 |
179 | <li·title="Distributed·Systems"><a·href="release_handling.html#idm140231007723152">Distributed·Systems</a></li> |
180 |
<li·title="Release·Handling·Instructions"><a·href="release_handling.html#idm1 |
180 | <li·title="Release·Handling·Instructions"><a·href="release_handling.html#idm140231007719984">Release·Handling·Instructions</a></li> |
181 |
<li·title="Application·Upgrade·File"><a·href="release_handling.html#idm1 |
181 | <li·title="Application·Upgrade·File"><a·href="release_handling.html#idm140231007656768">Application·Upgrade·File</a></li> |
182 |
<li·title="Release·Upgrade·File"><a·href="release_handling.html#idm1 |
182 | <li·title="Release·Upgrade·File"><a·href="release_handling.html#idm140231007634928">Release·Upgrade·File</a></li> |
183 |
<li·title="Installing·a·Release"><a·href="release_handling.html#idm1 |
183 | <li·title="Installing·a·Release"><a·href="release_handling.html#idm140231007616192">Installing·a·Release</a></li> |
184 |
<li·title="Updating·Application·Specifications"><a·href="release_handling.html#idm1 |
184 | <li·title="Updating·Application·Specifications"><a·href="release_handling.html#idm140231007559712">Updating·Application·Specifications</a></li> |
185 | </ul> | 185 | </ul> |
186 | </li> | 186 | </li> |
187 | <li·id="loadscrollpos"·title="Appup·Cookbook"·expanded="true">Appup·Cookbook<ul> | 187 | <li·id="loadscrollpos"·title="Appup·Cookbook"·expanded="true">Appup·Cookbook<ul> |
188 | <li><a·href="appup_cookbook.html"> | 188 | <li><a·href="appup_cookbook.html"> |
189 | ··············Top·of·chapter | 189 | ··············Top·of·chapter |
190 | ············</a></li> | 190 | ············</a></li> |
191 |
<li·title="Changing·a·Functional·Module"><a·href="appup_cookbook.html#idm1 |
191 | <li·title="Changing·a·Functional·Module"><a·href="appup_cookbook.html#idm140231007537632">Changing·a·Functional·Module</a></li> |
192 |
<li·title="Changing·a·Residence·Module"><a·href="appup_cookbook.html#idm1 |
192 | <li·title="Changing·a·Residence·Module"><a·href="appup_cookbook.html#idm140231007534896">Changing·a·Residence·Module</a></li> |
193 |
<li·title="Changing·a·Callback·Module"><a·href="appup_cookbook.html#idm1 |
193 | <li·title="Changing·a·Callback·Module"><a·href="appup_cookbook.html#idm140231007530240">Changing·a·Callback·Module</a></li> |
194 |
<li·title="Changing·Internal·State"><a·href="appup_cookbook.html#idm1 |
194 | <li·title="Changing·Internal·State"><a·href="appup_cookbook.html#idm140231007524112">Changing·Internal·State</a></li> |
195 |
<li·title="Module·Dependencies"><a·href="appup_cookbook.html#idm1 |
195 | <li·title="Module·Dependencies"><a·href="appup_cookbook.html#idm140231007507968">Module·Dependencies</a></li> |
196 |
<li·title="Changing·Code·For·a·Special·Process"><a·href="appup_cookbook.html#idm1 |
196 | <li·title="Changing·Code·For·a·Special·Process"><a·href="appup_cookbook.html#idm140231007487488">Changing·Code·For·a·Special·Process</a></li> |
197 |
<li·title="Changing·a·Supervisor"><a·href="appup_cookbook.html#idm1 |
197 | <li·title="Changing·a·Supervisor"><a·href="appup_cookbook.html#idm140231007467472">Changing·a·Supervisor</a></li> |
198 |
<li·title="Adding·or·Deleting·a·Module"><a·href="appup_cookbook.html#idm1 |
198 | <li·title="Adding·or·Deleting·a·Module"><a·href="appup_cookbook.html#idm140231007437968">Adding·or·Deleting·a·Module</a></li> |
199 |
<li·title="Starting·or·Terminating·a·Process"><a·href="appup_cookbook.html#idm1 |
199 | <li·title="Starting·or·Terminating·a·Process"><a·href="appup_cookbook.html#idm140231007434928">Starting·or·Terminating·a·Process</a></li> |
200 |
<li·title="Adding·or·Removing·an·Application"><a·href="appup_cookbook.html#idm1 |
200 | <li·title="Adding·or·Removing·an·Application"><a·href="appup_cookbook.html#idm140231007432704">Adding·or·Removing·an·Application</a></li> |
201 |
<li·title="Restarting·an·Application"><a·href="appup_cookbook.html#idm1 |
201 | <li·title="Restarting·an·Application"><a·href="appup_cookbook.html#idm140231007429024">Restarting·an·Application</a></li> |
202 |
<li·title="Changing·an·Application·Specification"><a·href="appup_cookbook.html#idm1 |
202 | <li·title="Changing·an·Application·Specification"><a·href="appup_cookbook.html#idm140231007423968">Changing·an·Application·Specification</a></li> |
203 |
<li·title="Changing·Application·Configuration"><a·href="appup_cookbook.html#idm1 |
203 | <li·title="Changing·Application·Configuration"><a·href="appup_cookbook.html#idm140231007421104">Changing·Application·Configuration</a></li> |
204 |
<li·title="Changing·Included·Applications"><a·href="appup_cookbook.html#idm1 |
204 | <li·title="Changing·Included·Applications"><a·href="appup_cookbook.html#idm140231007417088">Changing·Included·Applications</a></li> |
205 |
<li·title="Changing·Non-Erlang·Code"><a·href="appup_cookbook.html#idm1 |
205 | <li·title="Changing·Non-Erlang·Code"><a·href="appup_cookbook.html#idm140231007388304">Changing·Non-Erlang·Code</a></li> |
206 |
<li·title="Emulator·Restart·and·Upgrade"><a·href="appup_cookbook.html#idm1 |
206 | <li·title="Emulator·Restart·and·Upgrade"><a·href="appup_cookbook.html#idm140231007378160">Emulator·Restart·and·Upgrade</a></li> |
207 |
<li·title="Emulator·Upgrade·from·pre·OTP·R15"><a·href="appup_cookbook.html#idm1 |
207 | <li·title="Emulator·Upgrade·from·pre·OTP·R15"><a·href="appup_cookbook.html#idm140231007368976">Emulator·Upgrade·from·pre·OTP·R15</a></li> |
208 | </ul> | 208 | </ul> |
209 | </li> | 209 | </li> |
210 | </ul> | 210 | </ul> |
211 | </div></div> | 211 | </div></div> |
212 | <div·id="content"> | 212 | <div·id="content"> |
213 | <div·class="innertube"> | 213 | <div·class="innertube"> |
214 | <h1>12 Appup·Cookbook</h1> | 214 | <h1>12 Appup·Cookbook</h1> |
215 | ·· | 215 | ·· |
216 | ··<p>This·chapter·contains·examples·of·<span·class="code">.appup</span>·files·for | 216 | ··<p>This·chapter·contains·examples·of·<span·class="code">.appup</span>·files·for |
217 | ····typical·cases·of·upgrades/downgrades·done·in·run-time.</p> | 217 | ····typical·cases·of·upgrades/downgrades·done·in·run-time.</p> |
218 |
··<h3><a·name="idm1 |
218 | ··<h3><a·name="idm140231007537632">12.1 |
219 | ········Changing·a·Functional·Module</a></h3> | 219 | ········Changing·a·Functional·Module</a></h3> |
220 | ···· | 220 | ···· |
221 | ····<p>When·a·change·has·been·made·to·a·functional·module,·for·example | 221 | ····<p>When·a·change·has·been·made·to·a·functional·module,·for·example |
222 | ······if·a·new·function·has·been·added·or·a·bug·has·been·corrected, | 222 | ······if·a·new·function·has·been·added·or·a·bug·has·been·corrected, |
223 | ······simple·code·replacement·is·sufficient.</p> | 223 | ······simple·code·replacement·is·sufficient.</p> |
224 | ····<p>Example:</p> | 224 | ····<p>Example:</p> |
225 | ····<div·class="example"><pre> | 225 | ····<div·class="example"><pre> |
226 | {"2", | 226 | {"2", |
227 | ·[{"1",·[{load_module,·m}]}], | 227 | ·[{"1",·[{load_module,·m}]}], |
228 | ·[{"1",·[{load_module,·m}]}] | 228 | ·[{"1",·[{load_module,·m}]}] |
229 | }.</pre></div> | 229 | }.</pre></div> |
230 | ·· | 230 | ·· |
231 |
··<h3><a·name="idm1 |
231 | ··<h3><a·name="idm140231007534896">12.2 |
232 | ········Changing·a·Residence·Module</a></h3> | 232 | ········Changing·a·Residence·Module</a></h3> |
233 | ···· | 233 | ···· |
234 | ····<p>In·a·system·implemented·according·to·the·OTP·Design·Principles, | 234 | ····<p>In·a·system·implemented·according·to·the·OTP·Design·Principles, |
235 | ······all·processes,·except·system·processes·and·special·processes, | 235 | ······all·processes,·except·system·processes·and·special·processes, |
236 | ······reside·in·one·of·the·behaviours·<span·class="code">supervisor</span>, | 236 | ······reside·in·one·of·the·behaviours·<span·class="code">supervisor</span>, |
237 | ······<span·class="code">gen_server</span>,·<span·class="code">gen_fsm</span>·or·<span·class="code">gen_event</span>.·These | 237 | ······<span·class="code">gen_server</span>,·<span·class="code">gen_fsm</span>·or·<span·class="code">gen_event</span>.·These |
238 | ······belong·to·the·STDLIB·application·and·upgrading/downgrading | 238 | ······belong·to·the·STDLIB·application·and·upgrading/downgrading |
239 | ······normally·requires·an·emulator·restart.</p> | 239 | ······normally·requires·an·emulator·restart.</p> |
240 | ····<p>OTP·thus·provides·no·support·for·changing·residence·modules | 240 | ····<p>OTP·thus·provides·no·support·for·changing·residence·modules |
241 | ······except·in·the·case·of·<span·class="bold_code"><a·href="#spec">special·processes</a></span>.</p> | 241 | ······except·in·the·case·of·<span·class="bold_code"><a·href="#spec">special·processes</a></span>.</p> |
242 | ·· | 242 | ·· |
243 |
··<h3><a·name="idm1 |
243 | ··<h3><a·name="idm140231007530240">12.3 |
244 | ········Changing·a·Callback·Module</a></h3> | 244 | ········Changing·a·Callback·Module</a></h3> |
245 | ···· | 245 | ···· |
246 | ····<p>A·callback·module·is·a·functional·module,·and·for·code | 246 | ····<p>A·callback·module·is·a·functional·module,·and·for·code |
247 | ······extensions·simple·code·replacement·is·sufficient.</p> | 247 | ······extensions·simple·code·replacement·is·sufficient.</p> |
248 | ····<p>Example:·When·adding·a·function·to·<span·class="code">ch3</span>·as·described·in | 248 | ····<p>Example:·When·adding·a·function·to·<span·class="code">ch3</span>·as·described·in |
249 | ······the·example·in·<span·class="bold_code"><a·href="release_handling.html#appup">Release·Handling</a></span>,·<span·class="code">ch_app.appup</span>·looks·as·follows:</p> | 249 | ······the·example·in·<span·class="bold_code"><a·href="release_handling.html#appup">Release·Handling</a></span>,·<span·class="code">ch_app.appup</span>·looks·as·follows:</p> |
250 | ····<div·class="example"><pre> | 250 | ····<div·class="example"><pre> |
Offset 255, 15 lines modified | Offset 255, 15 lines modified | ||
255 | ·[{"1",·[{load_module,·ch3}]}], | 255 | ·[{"1",·[{load_module,·ch3}]}], |
256 | ·[{"1",·[{load_module,·ch3}]}] | 256 | ·[{"1",·[{load_module,·ch3}]}] |
257 | }.</pre></div> | 257 | }.</pre></div> |
258 | ····<p>OTP·also·supports·changing·the·internal·state·of·behaviour | 258 | ····<p>OTP·also·supports·changing·the·internal·state·of·behaviour |
259 | ······processes,·see·<span·class="bold_code"><a·href="#int_state">Changing·Internal·State</a></span>·below.</p> | 259 | ······processes,·see·<span·class="bold_code"><a·href="#int_state">Changing·Internal·State</a></span>·below.</p> |
260 | ·· | 260 | ·· |
261 |
··<h3><a·name="idm1 |
261 | ··<h3><a·name="idm140231007524112">12.4 |
262 | ········Changing·Internal·State</a></h3> | 262 | ········Changing·Internal·State</a></h3> |
263 | ····<a·name="int_state"></a> | 263 | ····<a·name="int_state"></a> |
264 | ···· | 264 | ···· |
265 | ····<p>In·this·case,·simple·code·replacement·is·not·sufficient. | 265 | ····<p>In·this·case,·simple·code·replacement·is·not·sufficient. |
266 | ······The·process·must·explicitly·transform·its·state·using·the·callback | 266 | ······The·process·must·explicitly·transform·its·state·using·the·callback |
267 | ······function·<span·class="code">code_change</span>·before·switching·to·the·new·version | 267 | ······function·<span·class="code">code_change</span>·before·switching·to·the·new·version |
268 | ······of·the·callback·module.·Thus·synchronized·code·replacement·is | 268 | ······of·the·callback·module.·Thus·synchronized·code·replacement·is |
Offset 305, 15 lines modified | Offset 305, 15 lines modified | ||
305 | ······the·version·is·the·checksum·(a·huge·integer)·of·the·BEAM·file,·an | 305 | ······the·version·is·the·checksum·(a·huge·integer)·of·the·BEAM·file,·an |
306 | ······uninteresting·value·which·is·ignored.</p> | 306 | ······uninteresting·value·which·is·ignored.</p> |
307 | ····<p>(The·other·callback·functions·of·<span·class="code">ch3</span>·need·to·be·modified | 307 | ····<p>(The·other·callback·functions·of·<span·class="code">ch3</span>·need·to·be·modified |
308 | ······as·well·and·perhaps·a·new·interface·function·added,·this·is·not | 308 | ······as·well·and·perhaps·a·new·interface·function·added,·this·is·not |
309 | ······shown·here).</p> | 309 | ······shown·here).</p> |
310 | ·· | 310 | ·· |
311 |
··<h3><a·name="idm1 |
311 | ··<h3><a·name="idm140231007507968">12.5 |
312 | ········Module·Dependencies</a></h3> | 312 | ········Module·Dependencies</a></h3> |
313 | ···· | 313 | ···· |
314 | ····<p>Assume·we·extend·a·module·by·adding·a·new·interface·function,·as | 314 | ····<p>Assume·we·extend·a·module·by·adding·a·new·interface·function,·as |
315 | ······in·the·example·in·<span·class="bold_code"><a·href="release_handling.html#appup">Release·Handling</a></span>,·where·a·function·<span·class="code">available/0</span>·is | 315 | ······in·the·example·in·<span·class="bold_code"><a·href="release_handling.html#appup">Release·Handling</a></span>,·where·a·function·<span·class="code">available/0</span>·is |
316 | ······added·to·<span·class="code">ch3</span>.</p> | 316 | ······added·to·<span·class="code">ch3</span>.</p> |
317 | ····<p>If·we·also·add·a·call·to·this·function,·say·in·the·module | 317 | ····<p>If·we·also·add·a·call·to·this·function,·say·in·the·module |
318 | ······<span·class="code">m1</span>,·a·run-time·error·could·occur·during·release·upgrade·if | 318 | ······<span·class="code">m1</span>,·a·run-time·error·could·occur·during·release·upgrade·if |
Offset 361, 15 lines modified | Offset 361, 15 lines modified | ||
361 | ····<p>Note·that·it·is·<span·class="code">m1</span>·that·is·dependent·on·<span·class="code">ch3</span>·also | 361 | ····<p>Note·that·it·is·<span·class="code">m1</span>·that·is·dependent·on·<span·class="code">ch3</span>·also |
362 | ······when·downgrading.·<span·class="code">systools</span>·knows·the·difference·between | 362 | ······when·downgrading.·<span·class="code">systools</span>·knows·the·difference·between |
363 | ······up-·and·downgrading·and·will·generate·a·correct·<span·class="code">relup</span>, | 363 | ······up-·and·downgrading·and·will·generate·a·correct·<span·class="code">relup</span>, |
364 | ······where·<span·class="code">ch3</span>·is·loaded·before·<span·class="code">m1</span>·when·upgrading·but | 364 | ······where·<span·class="code">ch3</span>·is·loaded·before·<span·class="code">m1</span>·when·upgrading·but |
365 | ······<span·class="code">m1</span>·is·loaded·before·<span·class="code">ch3</span>·when·downgrading.</p> | 365 | ······<span·class="code">m1</span>·is·loaded·before·<span·class="code">ch3</span>·when·downgrading.</p> |
366 | ·· | 366 | ·· |
367 |
··<h3><a·name="idm1 |
367 | ··<h3><a·name="idm140231007487488">12.6 |
368 | ········Changing·Code·For·a·Special·Process</a></h3> | 368 | ········Changing·Code·For·a·Special·Process</a></h3> |
369 | ····<a·name="spec"></a> | 369 | ····<a·name="spec"></a> |
370 | ···· | 370 | ···· |
371 | ····<p>In·this·case,·simple·code·replacement·is·not·sufficient. | 371 | ····<p>In·this·case,·simple·code·replacement·is·not·sufficient. |
372 | ······When·a·new·version·of·a·residence·module·for·a·special·process | 372 | ······When·a·new·version·of·a·residence·module·for·a·special·process |
373 | ······is·loaded,·the·process·must·make·a·fully·qualified·call·to | 373 | ······is·loaded,·the·process·must·make·a·fully·qualified·call·to |
374 | ······its·loop·function·to·switch·to·the·new·code.·Thus·synchronized | 374 | ······its·loop·function·to·switch·to·the·new·code.·Thus·synchronized |
Offset 425, 15 lines modified | Offset 425, 15 lines modified | ||
425 | ······enough·if·the·code·only·has·been·extended.·If·we·had·wanted·to | 425 | ······enough·if·the·code·only·has·been·extended.·If·we·had·wanted·to |
426 | ······change·the·internal·state·(similar·to·the·example·in | 426 | ······change·the·internal·state·(similar·to·the·example·in |
427 | ······<span·class="bold_code"><a·href="#int_state">Changing·Internal·State</a></span>), | 427 | ······<span·class="bold_code"><a·href="#int_state">Changing·Internal·State</a></span>), |
428 | ······it·would·have·been·done·in·this·function·and | 428 | ······it·would·have·been·done·in·this·function·and |
429 | ······<span·class="code">{ok,Chs2}</span>·returned.</p> | 429 | ······<span·class="code">{ok,Chs2}</span>·returned.</p> |
430 | ·· | 430 | ·· |
431 |
··<h3><a·name="idm1 |
431 | ··<h3><a·name="idm140231007467472">12.7 |
432 | ········Changing·a·Supervisor</a></h3> | 432 | ········Changing·a·Supervisor</a></h3> |
433 | ····<a·name="sup"></a> | 433 | ····<a·name="sup"></a> |
434 | ···· | 434 | ···· |
435 | ····<p>The·supervisor·behaviour·supports·changing·the·internal·state, | 435 | ····<p>The·supervisor·behaviour·supports·changing·the·internal·state, |
436 | ······i.e.·changing·restart·strategy·and·maximum·restart·frequency | 436 | ······i.e.·changing·restart·strategy·and·maximum·restart·frequency |
437 | ······properties,·as·well·as·changing·existing·child·specifications.</p> | 437 | ······properties,·as·well·as·changing·existing·child·specifications.</p> |
438 | ····<p>Adding·and·deleting·child·processes·are·also·possible,·but·not | 438 | ····<p>Adding·and·deleting·child·processes·are·also·possible,·but·not |
Offset 545, 43 lines modified | Offset 545, 43 lines modified | ||
545 | ········child·specification·changed,·before·the·new·child·process·can | 545 | ········child·specification·changed,·before·the·new·child·process·can |
546 | ········be·started.·When·downgrading,·the·child·process·must·be | 546 | ········be·started.·When·downgrading,·the·child·process·must·be |
547 | ········terminated·before·child·specification·is·changed·and·the·module | 547 | ········terminated·before·child·specification·is·changed·and·the·module |
548 | ········is·deleted.</p> | 548 | ········is·deleted.</p> |
549 | ···· | 549 | ···· |
550 | ·· | 550 | ·· |
551 |
··<h3><a·name="idm1 |
551 | ··<h3><a·name="idm140231007437968">12.8 |
552 | ········Adding·or·Deleting·a·Module</a></h3> | 552 | ········Adding·or·Deleting·a·Module</a></h3> |
553 | ···· | 553 | ···· |
554 | ····<p>Example:·A·new·functional·module·<span·class="code">m</span>·is·added·to | 554 | ····<p>Example:·A·new·functional·module·<span·class="code">m</span>·is·added·to |
555 | ······<span·class="code">ch_app</span>:</p> | 555 | ······<span·class="code">ch_app</span>:</p> |
556 | ····<div·class="example"><pre> | 556 | ····<div·class="example"><pre> |
557 | {"2", | 557 | {"2", |
558 | ·[{"1",·[{add_module,·m}]}], | 558 | ·[{"1",·[{add_module,·m}]}], |
559 | ·[{"1",·[{delete_module,·m}]}]</pre></div> | 559 | ·[{"1",·[{delete_module,·m}]}]</pre></div> |
560 | ·· | 560 | ·· |
561 |
··<h3><a·name="idm1 |
561 | ··<h3><a·name="idm140231007434928">12.9 |
562 | ········Starting·or·Terminating·a·Process</a></h3> | 562 | ········Starting·or·Terminating·a·Process</a></h3> |
563 | ···· | 563 | ···· |
564 | ····<p>In·a·system·structured·according·to·the·OTP·design·principles, | 564 | ····<p>In·a·system·structured·according·to·the·OTP·design·principles, |
565 | ······any·process·would·be·a·child·process·belonging·to·a·supervisor, | 565 | ······any·process·would·be·a·child·process·belonging·to·a·supervisor, |
566 | ······see·<span·class="bold_code"><a·href="#sup_add">Adding·and·Deleting·Child·Processes</a></span>·above.</p> | 566 | ······see·<span·class="bold_code"><a·href="#sup_add">Adding·and·Deleting·Child·Processes</a></span>·above.</p> |
567 | ·· | 567 | ·· |
568 |
··<h3><a·name="idm1 |
568 | ··<h3><a·name="idm140231007432704">12.10 |
569 | ········Adding·or·Removing·an·Application</a></h3> | 569 | ········Adding·or·Removing·an·Application</a></h3> |
570 | ···· | 570 | ···· |
571 | ····<p>When·adding·or·removing·an·application,·no·<span·class="code">.appup</span>·file | 571 | ····<p>When·adding·or·removing·an·application,·no·<span·class="code">.appup</span>·file |
572 | ······is·needed.·When·generating·<span·class="code">relup</span>,·the·<span·class="code">.rel</span>·files | 572 | ······is·needed.·When·generating·<span·class="code">relup</span>,·the·<span·class="code">.rel</span>·files |
573 | ······are·compared·and·<span·class="code">add_application</span>·and | 573 | ······are·compared·and·<span·class="code">add_application</span>·and |
574 | ······<span·class="code">remove_application</span>·instructions·are·added·automatically.</p> | 574 | ······<span·class="code">remove_application</span>·instructions·are·added·automatically.</p> |
575 | ·· | 575 | ·· |
576 |
··<h3><a·name="idm1 |
576 | ··<h3><a·name="idm140231007429024">12.11 |
577 | ········Restarting·an·Application</a></h3> | 577 | ········Restarting·an·Application</a></h3> |
578 | ···· | 578 | ···· |
579 | ····<p>Restarting·an·application·is·useful·when·a·change·is·too | 579 | ····<p>Restarting·an·application·is·useful·when·a·change·is·too |
580 | ······complicated·to·be·made·without·restarting·the·processes,·for | 580 | ······complicated·to·be·made·without·restarting·the·processes,·for |
581 | ······example·if·the·supervisor·hierarchy·has·been·restructured.</p> | 581 | ······example·if·the·supervisor·hierarchy·has·been·restructured.</p> |
582 | ····<p>Example:·When·adding·a·new·child·<span·class="code">m1</span>·to·<span·class="code">ch_sup</span>,·as | 582 | ····<p>Example:·When·adding·a·new·child·<span·class="code">m1</span>·to·<span·class="code">ch_sup</span>,·as |
583 | ······in·the·<span·class="bold_code"><a·href="#sup_add">example·above</a></span>,·an | 583 | ······in·the·<span·class="bold_code"><a·href="#sup_add">example·above</a></span>,·an |
Offset 590, 39 lines modified | Offset 590, 39 lines modified | ||
590 | ····<div·class="example"><pre> | 590 | ····<div·class="example"><pre> |
591 | {"2", | 591 | {"2", |
592 | ·[{"1",·[{restart_application,·ch_app}]}], | 592 | ·[{"1",·[{restart_application,·ch_app}]}], |
593 | ·[{"1",·[{restart_application,·ch_app}]}] | 593 | ·[{"1",·[{restart_application,·ch_app}]}] |
594 | }.</pre></div> | 594 | }.</pre></div> |
595 | ·· | 595 | ·· |
596 |
··<h3><a·name="idm1 |
596 | ··<h3><a·name="idm140231007423968">12.12 |
597 | ········Changing·an·Application·Specification</a></h3> | 597 | ········Changing·an·Application·Specification</a></h3> |
598 | ····<a·name="app_spec"></a> | 598 | ····<a·name="app_spec"></a> |
599 | ···· | 599 | ···· |
600 | ····<p>When·installing·a·release,·the·application·specifications·are | 600 | ····<p>When·installing·a·release,·the·application·specifications·are |
601 | ······automatically·updated·before·evaluating·the·<span·class="code">relup</span>·script. | 601 | ······automatically·updated·before·evaluating·the·<span·class="code">relup</span>·script. |
602 | ······Hence,·no·instructions·are··needed·in·the·<span·class="code">.appup</span>·file:</p> | 602 | ······Hence,·no·instructions·are··needed·in·the·<span·class="code">.appup</span>·file:</p> |
603 | ····<div·class="example"><pre> | 603 | ····<div·class="example"><pre> |
604 | {"2", | 604 | {"2", |
605 | ·[{"1",·[]}], | 605 | ·[{"1",·[]}], |
606 | ·[{"1",·[]}] | 606 | ·[{"1",·[]}] |
607 | }.</pre></div> | 607 | }.</pre></div> |
608 | ·· | 608 | ·· |
609 |
··<h3><a·name="idm1 |
609 | ··<h3><a·name="idm140231007421104">12.13 |
610 | ········Changing·Application·Configuration</a></h3> | 610 | ········Changing·Application·Configuration</a></h3> |
611 | ···· | 611 | ···· |
612 | ····<p>Changing·an·application·configuration·by·updating·the·<span·class="code">env</span> | 612 | ····<p>Changing·an·application·configuration·by·updating·the·<span·class="code">env</span> |
613 | ······key·in·the·<span·class="code">.app</span>·file·is·an·instance·of·changing·an | 613 | ······key·in·the·<span·class="code">.app</span>·file·is·an·instance·of·changing·an |
614 | ······application·specification,·<span·class="bold_code"><a·href="#app_spec">see·above</a></span>.</p> | 614 | ······application·specification,·<span·class="bold_code"><a·href="#app_spec">see·above</a></span>.</p> |
615 | ····<p>Alternatively,·application·configuration·parameters·can·be | 615 | ····<p>Alternatively,·application·configuration·parameters·can·be |
616 | ······added·or·updated·in·<span·class="code">sys.config</span>.</p> | 616 | ······added·or·updated·in·<span·class="code">sys.config</span>.</p> |
617 | ·· | 617 | ·· |
618 |
··<h3><a·name="idm1 |
618 | ··<h3><a·name="idm140231007417088">12.14 |
619 | ········Changing·Included·Applications</a></h3> | 619 | ········Changing·Included·Applications</a></h3> |
620 | ···· | 620 | ···· |
621 | ····<p>The·release·handling·instructions·for·adding,·removing·and | 621 | ····<p>The·release·handling·instructions·for·adding,·removing·and |
622 | ······restarting·applications·apply·to·primary·applications·only. | 622 | ······restarting·applications·apply·to·primary·applications·only. |
623 | ······There·are·no·corresponding·instructions·for·included | 623 | ······There·are·no·corresponding·instructions·for·included |
624 | ······applications.·However,·since·an·included·application·is·really·a | 624 | ······applications.·However,·since·an·included·application·is·really·a |
625 | ······supervision·tree·with·a·topmost·supervisor,·started·as·a·child | 625 | ······supervision·tree·with·a·topmost·supervisor,·started·as·a·child |
Offset 755, 15 lines modified | Offset 755, 15 lines modified | ||
755 | ····{remove,{ch3,brutal_purge,brutal_purge}}, | 755 | ····{remove,{ch3,brutal_purge,brutal_purge}}, |
756 | ····{purge,[ch_sup,ch3]}, | 756 | ····{purge,[ch_sup,ch3]}, |
757 | ····{apply,{application,unload,[ch_app]}}]}] | 757 | ····{apply,{application,unload,[ch_app]}}]}] |
758 | }.</pre></div> | 758 | }.</pre></div> |
759 | ···· | 759 | ···· |
760 | ·· | 760 | ·· |
761 |
··<h3><a·name="idm1 |
761 | ··<h3><a·name="idm140231007388304">12.15 |
762 | ········Changing·Non-Erlang·Code</a></h3> | 762 | ········Changing·Non-Erlang·Code</a></h3> |
763 | ···· | 763 | ···· |
764 | ····<p>Changing·code·for·a·program·written·in·another·programming | 764 | ····<p>Changing·code·for·a·program·written·in·another·programming |
765 | ······language·than·Erlang,·for·example·a·port·program,·is·very | 765 | ······language·than·Erlang,·for·example·a·port·program,·is·very |
766 | ······application·dependent·and·OTP·provides·no·special·support·for·it.</p> | 766 | ······application·dependent·and·OTP·provides·no·special·support·for·it.</p> |
767 | ····<p>Example,·changing·code·for·a·port·program:·Assume·that | 767 | ····<p>Example,·changing·code·for·a·port·program:·Assume·that |
768 | ······the·Erlang·process·controlling·the·port·is·a·gen_server | 768 | ······the·Erlang·process·controlling·the·port·is·a·gen_server |
Offset 801, 15 lines modified | Offset 801, 15 lines modified | ||
801 | ····<p>Make·sure·the·<span·class="code">priv</span>·directory·where·the·C·program·is | 801 | ····<p>Make·sure·the·<span·class="code">priv</span>·directory·where·the·C·program·is |
802 | ······located·is·included·in·the·new·release·package:</p> | 802 | ······located·is·included·in·the·new·release·package:</p> |
803 | ····<div·class="example"><pre> | 803 | ····<div·class="example"><pre> |
804 | 1>·<span·class="bold_code">systools:make_tar("my_release",·[{dirs,[priv]}]).</span> | 804 | 1>·<span·class="bold_code">systools:make_tar("my_release",·[{dirs,[priv]}]).</span> |
805 | ...</pre></div> | 805 | ...</pre></div> |
806 | ·· | 806 | ·· |
807 |
··<h3><a·name="idm1 |
807 | ··<h3><a·name="idm140231007378160">12.16 |
808 | ········Emulator·Restart·and·Upgrade</a></h3> | 808 | ········Emulator·Restart·and·Upgrade</a></h3> |
809 | ···· | 809 | ···· |
810 | ····<p>There·are·two·upgrade·instructions·that·will·restart·the·emulator:</p> | 810 | ····<p>There·are·two·upgrade·instructions·that·will·restart·the·emulator:</p> |
811 | ····<dl> | 811 | ····<dl> |
812 | ······<dt><strong><span·class="code">restart_new_emulator</span></strong></dt> | 812 | ······<dt><strong><span·class="code">restart_new_emulator</span></strong></dt> |
813 | ······<dd>Intended·for·when·erts,·kernel,·stdlib·or·sasl·is | 813 | ······<dd>Intended·for·when·erts,·kernel,·stdlib·or·sasl·is |
814 | ········upgraded.·It·is·automatically·added·when·the·relup·file·is | 814 | ········upgraded.·It·is·automatically·added·when·the·relup·file·is |
Offset 841, 15 lines modified | Offset 841, 15 lines modified | ||
841 | }.</pre></div> | 841 | }.</pre></div> |
842 | ····<p>In·this·case,·the·release·handler·framework·with·automatic | 842 | ····<p>In·this·case,·the·release·handler·framework·with·automatic |
843 | ······packing·and·unpacking·of·release·packages,·automatic·path | 843 | ······packing·and·unpacking·of·release·packages,·automatic·path |
844 | ······updates·etc.·can·be·used·without·having·to·specify·<span·class="code">.appup</span> | 844 | ······updates·etc.·can·be·used·without·having·to·specify·<span·class="code">.appup</span> |
845 | ······files.</p> | 845 | ······files.</p> |
846 | ·· | 846 | ·· |
847 |
··<h3><a·name="idm1 |
847 | ··<h3><a·name="idm140231007368976">12.17 |
848 | ········Emulator·Upgrade·from·pre·OTP·R15</a></h3> | 848 | ········Emulator·Upgrade·from·pre·OTP·R15</a></h3> |
849 | ···· | 849 | ···· |
850 | ····<p>From·OTP·R15,·an·emulator·upgrade·is·performed·by·restarting | 850 | ····<p>From·OTP·R15,·an·emulator·upgrade·is·performed·by·restarting |
851 | ····the·emulator·with·new·versions·of·the·core·applications | 851 | ····the·emulator·with·new·versions·of·the·core·applications |
852 | ····(<span·class="code">kernel</span>,·<span·class="code">stdlib</span>·and·<span·class="code">sasl</span>)·before·loading·code | 852 | ····(<span·class="code">kernel</span>,·<span·class="code">stdlib</span>·and·<span·class="code">sasl</span>)·before·loading·code |
853 | ····and·running·upgrade·instruction·for·other·applications.·For·this | 853 | ····and·running·upgrade·instruction·for·other·applications.·For·this |
854 | ····to·work,·the·release·to·upgrade·from·must·includes·OTP·R15·or | 854 | ····to·work,·the·release·to·upgrade·from·must·includes·OTP·R15·or |
Offset 47, 181 lines modified | Offset 47, 181 lines modified | ||
47 | <img·alt="Erlang·logo"·src="../erlang-logo.png"><br><small><a·href="users_guide.html">User's·Guide</a><br><a·href="../pdf/otp-system-documentation-6.3.pdf">PDF</a><br><a·href="../index.html">Top</a></small><p><strong>OTP·Design·Principles</strong><br><strong>User's·Guide</strong><br><small>Version·6.3</small></p> | 47 | <img·alt="Erlang·logo"·src="../erlang-logo.png"><br><small><a·href="users_guide.html">User's·Guide</a><br><a·href="../pdf/otp-system-documentation-6.3.pdf">PDF</a><br><a·href="../index.html">Top</a></small><p><strong>OTP·Design·Principles</strong><br><strong>User's·Guide</strong><br><small>Version·6.3</small></p> |
48 | <br><a·href="javascript:openAllFlips()">Expand·All</a><br><a·href="javascript:closeAllFlips()">Contract·All</a><p><small><strong>Chapters</strong></small></p> | 48 | <br><a·href="javascript:openAllFlips()">Expand·All</a><br><a·href="javascript:closeAllFlips()">Contract·All</a><p><small><strong>Chapters</strong></small></p> |
49 | <ul·class="flipMenu"·imagepath="../js/flipmenu"> | 49 | <ul·class="flipMenu"·imagepath="../js/flipmenu"> |
50 | <li·id="loadscrollpos"·title="Overview"·expanded="true">Overview<ul> | 50 | <li·id="loadscrollpos"·title="Overview"·expanded="true">Overview<ul> |
51 | <li><a·href="des_princ.html"> | 51 | <li><a·href="des_princ.html"> |
52 | ··············Top·of·chapter | 52 | ··············Top·of·chapter |
53 | ············</a></li> | 53 | ············</a></li> |
54 |
<li·title="Supervision·Trees"><a·href="des_princ.html#idm1 |
54 | <li·title="Supervision·Trees"><a·href="des_princ.html#idm140231008664592">Supervision·Trees</a></li> |
55 |
<li·title="Behaviours"><a·href="des_princ.html#idm1 |
55 | <li·title="Behaviours"><a·href="des_princ.html#idm140231008672688">Behaviours</a></li> |
56 |
<li·title="Applications"><a·href="des_princ.html#idm1 |
56 | <li·title="Applications"><a·href="des_princ.html#idm140231008752016">Applications</a></li> |
57 |
<li·title="Releases"><a·href="des_princ.html#idm1 |
57 | <li·title="Releases"><a·href="des_princ.html#idm140231008757072">Releases</a></li> |
58 |
<li·title="Release·Handling"><a·href="des_princ.html#idm1 |
58 | <li·title="Release·Handling"><a·href="des_princ.html#idm140231008760592">Release·Handling</a></li> |
59 | </ul> | 59 | </ul> |
60 | </li> | 60 | </li> |
61 | <li·id="no"·title="Gen_Server·Behaviour"·expanded="false">Gen_Server·Behaviour<ul> | 61 | <li·id="no"·title="Gen_Server·Behaviour"·expanded="false">Gen_Server·Behaviour<ul> |
62 | <li><a·href="gen_server_concepts.html"> | 62 | <li><a·href="gen_server_concepts.html"> |
63 | ··············Top·of·chapter | 63 | ··············Top·of·chapter |
64 | ············</a></li> | 64 | ············</a></li> |
65 |
<li·title="Client-Server·Principles"><a·href="gen_server_concepts.html#idm1 |
65 | <li·title="Client-Server·Principles"><a·href="gen_server_concepts.html#idm140231008770128">Client-Server·Principles</a></li> |
66 |
<li·title="Example"><a·href="gen_server_concepts.html#idm1 |
66 | <li·title="Example"><a·href="gen_server_concepts.html#idm140231008697632">Example</a></li> |
67 |
<li·title="Starting·a·Gen_Server"><a·href="gen_server_concepts.html#idm1 |
67 | <li·title="Starting·a·Gen_Server"><a·href="gen_server_concepts.html#idm140231008702000">Starting·a·Gen_Server</a></li> |
68 |
<li·title="Synchronous·Requests·-·Call"><a·href="gen_server_concepts.html#idm1 |
68 | <li·title="Synchronous·Requests·-·Call"><a·href="gen_server_concepts.html#idm140231008776224">Synchronous·Requests·-·Call</a></li> |
69 |
<li·title="Asynchronous·Requests·-·Cast"><a·href="gen_server_concepts.html#idm1 |
69 | <li·title="Asynchronous·Requests·-·Cast"><a·href="gen_server_concepts.html#idm140231008786432">Asynchronous·Requests·-·Cast</a></li> |
70 |
<li·title="Stopping"><a·href="gen_server_concepts.html#idm1 |
70 | <li·title="Stopping"><a·href="gen_server_concepts.html#idm140231009075376">Stopping</a></li> |
71 |
<li·title="Handling·Other·Messages"><a·href="gen_server_concepts.html#idm1 |
71 | <li·title="Handling·Other·Messages"><a·href="gen_server_concepts.html#idm140231008621744">Handling·Other·Messages</a></li> |
72 | </ul> | 72 | </ul> |
73 | </li> | 73 | </li> |
74 | <li·id="no"·title="Gen_Fsm·Behaviour"·expanded="false">Gen_Fsm·Behaviour<ul> | 74 | <li·id="no"·title="Gen_Fsm·Behaviour"·expanded="false">Gen_Fsm·Behaviour<ul> |
75 | <li><a·href="fsm.html"> | 75 | <li><a·href="fsm.html"> |
76 | ··············Top·of·chapter | 76 | ··············Top·of·chapter |
77 | ············</a></li> | 77 | ············</a></li> |
78 |
<li·title="Finite·State·Machines"><a·href="fsm.html#idm1 |
78 | <li·title="Finite·State·Machines"><a·href="fsm.html#idm140231009090752">Finite·State·Machines</a></li> |
79 |
<li·title="Example"><a·href="fsm.html#idm1 |
79 | <li·title="Example"><a·href="fsm.html#idm140231008799248">Example</a></li> |
80 |
<li·title="Starting·a·Gen_Fsm"><a·href="fsm.html#idm1 |
80 | <li·title="Starting·a·Gen_Fsm"><a·href="fsm.html#idm140231009551600">Starting·a·Gen_Fsm</a></li> |
81 |
<li·title="Notifying·About·Events"><a·href="fsm.html#idm1 |
81 | <li·title="Notifying·About·Events"><a·href="fsm.html#idm140231009115360">Notifying·About·Events</a></li> |
82 |
<li·title="Timeouts"><a·href="fsm.html#idm1 |
82 | <li·title="Timeouts"><a·href="fsm.html#idm140231009808544">Timeouts</a></li> |
83 |
<li·title="All·State·Events"><a·href="fsm.html#idm1 |
83 | <li·title="All·State·Events"><a·href="fsm.html#idm140231009303152">All·State·Events</a></li> |
84 |
<li·title="Stopping"><a·href="fsm.html#idm1 |
84 | <li·title="Stopping"><a·href="fsm.html#idm140231008912976">Stopping</a></li> |
85 |
<li·title="Handling·Other·Messages"><a·href="fsm.html#idm1 |
85 | <li·title="Handling·Other·Messages"><a·href="fsm.html#idm140231008432688">Handling·Other·Messages</a></li> |
86 | </ul> | 86 | </ul> |
87 | </li> | 87 | </li> |
88 | <li·id="no"·title="Gen_Event·Behaviour"·expanded="false">Gen_Event·Behaviour<ul> | 88 | <li·id="no"·title="Gen_Event·Behaviour"·expanded="false">Gen_Event·Behaviour<ul> |
89 | <li><a·href="events.html"> | 89 | <li><a·href="events.html"> |
90 | ··············Top·of·chapter | 90 | ··············Top·of·chapter |
91 | ············</a></li> | 91 | ············</a></li> |
92 |
<li·title="Event·Handling·Principles"><a·href="events.html#idm1 |
92 | <li·title="Event·Handling·Principles"><a·href="events.html#idm140231009179392">Event·Handling·Principles</a></li> |
93 |
<li·title="Example"><a·href="events.html#idm1 |
93 | <li·title="Example"><a·href="events.html#idm140231008417152">Example</a></li> |
94 |
<li·title="Starting·an·Event·Manager"><a·href="events.html#idm1 |
94 | <li·title="Starting·an·Event·Manager"><a·href="events.html#idm140231008413136">Starting·an·Event·Manager</a></li> |
95 |
<li·title="Adding·an·Event·Handler"><a·href="events.html#idm1 |
95 | <li·title="Adding·an·Event·Handler"><a·href="events.html#idm140231009388752">Adding·an·Event·Handler</a></li> |
96 |
<li·title="Notifying·About·Events"><a·href="events.html#idm1 |
96 | <li·title="Notifying·About·Events"><a·href="events.html#idm140231008728512">Notifying·About·Events</a></li> |
97 |
<li·title="Deleting·an·Event·Handler"><a·href="events.html#idm1 |
97 | <li·title="Deleting·an·Event·Handler"><a·href="events.html#idm140231008720736">Deleting·an·Event·Handler</a></li> |
98 |
<li·title="Stopping"><a·href="events.html#idm1 |
98 | <li·title="Stopping"><a·href="events.html#idm140231008689408">Stopping</a></li> |
99 |
<li·title="Handling·Other·Messages"><a·href="events.html#idm1 |
99 | <li·title="Handling·Other·Messages"><a·href="events.html#idm140231008683248">Handling·Other·Messages</a></li> |
100 | </ul> | 100 | </ul> |
101 | </li> | 101 | </li> |
102 | <li·id="no"·title="Supervisor·Behaviour"·expanded="false">Supervisor·Behaviour<ul> | 102 | <li·id="no"·title="Supervisor·Behaviour"·expanded="false">Supervisor·Behaviour<ul> |
103 | <li><a·href="sup_princ.html"> | 103 | <li><a·href="sup_princ.html"> |
104 | ··············Top·of·chapter | 104 | ··············Top·of·chapter |
105 | ············</a></li> | 105 | ············</a></li> |
106 |
<li·title="Supervision·Principles"><a·href="sup_princ.html#idm1 |
106 | <li·title="Supervision·Principles"><a·href="sup_princ.html#idm140231008291744">Supervision·Principles</a></li> |
107 |
<li·title="Example"><a·href="sup_princ.html#idm1 |
107 | <li·title="Example"><a·href="sup_princ.html#idm140231009682528">Example</a></li> |
108 |
<li·title="Restart·Strategy"><a·href="sup_princ.html#idm1 |
108 | <li·title="Restart·Strategy"><a·href="sup_princ.html#idm140231009629632">Restart·Strategy</a></li> |
109 |
<li·title="Maximum·Restart·Frequency"><a·href="sup_princ.html#idm1 |
109 | <li·title="Maximum·Restart·Frequency"><a·href="sup_princ.html#idm140231008896368">Maximum·Restart·Frequency</a></li> |
110 |
<li·title="Child·Specification"><a·href="sup_princ.html#idm1 |
110 | <li·title="Child·Specification"><a·href="sup_princ.html#idm140231008285744">Child·Specification</a></li> |
111 |
<li·title="Starting·a·Supervisor"><a·href="sup_princ.html#idm1 |
111 | <li·title="Starting·a·Supervisor"><a·href="sup_princ.html#idm140231008253328">Starting·a·Supervisor</a></li> |
112 |
<li·title="Adding·a·Child·Process"><a·href="sup_princ.html#idm1 |
112 | <li·title="Adding·a·Child·Process"><a·href="sup_princ.html#idm140231008242208">Adding·a·Child·Process</a></li> |
113 |
<li·title="Stopping·a·Child·Process"><a·href="sup_princ.html#idm1 |
113 | <li·title="Stopping·a·Child·Process"><a·href="sup_princ.html#idm140231008237824">Stopping·a·Child·Process</a></li> |
114 |
<li·title="Simple-One-For-One·Supervisors"><a·href="sup_princ.html#idm1 |
114 | <li·title="Simple-One-For-One·Supervisors"><a·href="sup_princ.html#idm140231008233024">Simple-One-For-One·Supervisors</a></li> |
115 |
<li·title="Stopping"><a·href="sup_princ.html#idm1 |
115 | <li·title="Stopping"><a·href="sup_princ.html#idm140231008218080">Stopping</a></li> |
116 | </ul> | 116 | </ul> |
117 | </li> | 117 | </li> |
118 | <li·id="no"·title="Sys·and·Proc_Lib"·expanded="false">Sys·and·Proc_Lib<ul> | 118 | <li·id="no"·title="Sys·and·Proc_Lib"·expanded="false">Sys·and·Proc_Lib<ul> |
119 | <li><a·href="spec_proc.html"> | 119 | <li><a·href="spec_proc.html"> |
120 | ··············Top·of·chapter | 120 | ··············Top·of·chapter |
121 | ············</a></li> | 121 | ············</a></li> |
122 |
<li·title="Simple·Debugging"><a·href="spec_proc.html#idm1 |
122 | <li·title="Simple·Debugging"><a·href="spec_proc.html#idm140231008206384">Simple·Debugging</a></li> |
123 |
<li·title="Special·Processes"><a·href="spec_proc.html#idm1 |
123 | <li·title="Special·Processes"><a·href="spec_proc.html#idm140231008196256">Special·Processes</a></li> |
124 |
<li·title="User-Defined·Behaviours"><a·href="spec_proc.html#idm1 |
124 | <li·title="User-Defined·Behaviours"><a·href="spec_proc.html#idm140231008119008">User-Defined·Behaviours</a></li> |
125 | </ul> | 125 | </ul> |
126 | </li> | 126 | </li> |
127 | <li·id="no"·title="Applications"·expanded="false">Applications<ul> | 127 | <li·id="no"·title="Applications"·expanded="false">Applications<ul> |
128 | <li><a·href="applications.html"> | 128 | <li><a·href="applications.html"> |
129 | ··············Top·of·chapter | 129 | ··············Top·of·chapter |
130 | ············</a></li> | 130 | ············</a></li> |
131 |
<li·title="Application·Concept"><a·href="applications.html#idm1 |
131 | <li·title="Application·Concept"><a·href="applications.html#idm140231008095264">Application·Concept</a></li> |
132 |
<li·title="Application·Callback·Module"><a·href="applications.html#idm1 |
132 | <li·title="Application·Callback·Module"><a·href="applications.html#idm140231008087216">Application·Callback·Module</a></li> |
133 |
<li·title="Application·Resource·File"><a·href="applications.html#idm1 |
133 | <li·title="Application·Resource·File"><a·href="applications.html#idm140231008073536">Application·Resource·File</a></li> |
134 |
<li·title="Directory·Structure"><a·href="applications.html#idm1 |
134 | <li·title="Directory·Structure"><a·href="applications.html#idm140231008043200">Directory·Structure</a></li> |
135 |
<li·title="Application·Controller"><a·href="applications.html#idm1 |
135 | <li·title="Application·Controller"><a·href="applications.html#idm140231008028064">Application·Controller</a></li> |
136 |
<li·title="Loading·and·Unloading·Applications"><a·href="applications.html#idm1 |
136 | <li·title="Loading·and·Unloading·Applications"><a·href="applications.html#idm140231008024128">Loading·and·Unloading·Applications</a></li> |
137 |
<li·title="Starting·and·Stopping·Applications"><a·href="applications.html#idm1 |
137 | <li·title="Starting·and·Stopping·Applications"><a·href="applications.html#idm140231008016672">Starting·and·Stopping·Applications</a></li> |
138 |
<li·title="Configuring·an·Application"><a·href="applications.html#idm1 |
138 | <li·title="Configuring·an·Application"><a·href="applications.html#idm140231008006160">Configuring·an·Application</a></li> |
139 |
<li·title="Application·Start·Types"><a·href="applications.html#idm1 |
139 | <li·title="Application·Start·Types"><a·href="applications.html#idm140231007982224">Application·Start·Types</a></li> |
140 | </ul> | 140 | </ul> |
141 | </li> | 141 | </li> |
142 | <li·id="no"·title="Included·Applications"·expanded="false">Included·Applications<ul> | 142 | <li·id="no"·title="Included·Applications"·expanded="false">Included·Applications<ul> |
143 | <li><a·href="included_applications.html"> | 143 | <li><a·href="included_applications.html"> |
144 | ··············Top·of·chapter | 144 | ··············Top·of·chapter |
145 | ············</a></li> | 145 | ············</a></li> |
146 |
<li·title="Definition"><a·href="included_applications.html#idm1 |
146 | <li·title="Definition"><a·href="included_applications.html#idm140231007965456">Definition</a></li> |
147 |
<li·title="Specifying·Included·Applications"><a·href="included_applications.html#idm1 |
147 | <li·title="Specifying·Included·Applications"><a·href="included_applications.html#idm140231007957600">Specifying·Included·Applications</a></li> |
148 |
<li·title="Synchronizing·Processes·During·Startup"><a·href="included_applications.html#idm1 |
148 | <li·title="Synchronizing·Processes·During·Startup"><a·href="included_applications.html#idm140231007954560">Synchronizing·Processes·During·Startup</a></li> |
149 | </ul> | 149 | </ul> |
150 | </li> | 150 | </li> |
151 | <li·id="no"·title="Distributed·Applications"·expanded="false">Distributed·Applications<ul> | 151 | <li·id="no"·title="Distributed·Applications"·expanded="false">Distributed·Applications<ul> |
152 | <li><a·href="distributed_applications.html"> | 152 | <li><a·href="distributed_applications.html"> |
153 | ··············Top·of·chapter | 153 | ··············Top·of·chapter |
154 | ············</a></li> | 154 | ············</a></li> |
155 |
<li·title="Definition"><a·href="distributed_applications.html#idm1 |
155 | <li·title="Definition"><a·href="distributed_applications.html#idm140231007928960">Definition</a></li> |
156 |
<li·title="Specifying·Distributed·Applications"><a·href="distributed_applications.html#idm1 |
156 | <li·title="Specifying·Distributed·Applications"><a·href="distributed_applications.html#idm140231007924640">Specifying·Distributed·Applications</a></li> |
157 |
<li·title="Starting·and·Stopping·Distributed·Applications"><a·href="distributed_applications.html#idm1 |
157 | <li·title="Starting·and·Stopping·Distributed·Applications"><a·href="distributed_applications.html#idm140231007899872">Starting·and·Stopping·Distributed·Applications</a></li> |
158 |
<li·title="Failover"><a·href="distributed_applications.html#idm1 |
158 | <li·title="Failover"><a·href="distributed_applications.html#idm140231007887632">Failover</a></li> |
159 |
<li·title="Takeover"><a·href="distributed_applications.html#idm1 |
159 | <li·title="Takeover"><a·href="distributed_applications.html#idm140231007870560">Takeover</a></li> |
160 | </ul> | 160 | </ul> |
161 | </li> | 161 | </li> |
162 | <li·id="no"·title="Releases"·expanded="false">Releases<ul> | 162 | <li·id="no"·title="Releases"·expanded="false">Releases<ul> |
163 | <li><a·href="release_structure.html"> | 163 | <li><a·href="release_structure.html"> |
164 | ··············Top·of·chapter | 164 | ··············Top·of·chapter |
165 | ············</a></li> | 165 | ············</a></li> |
166 |
<li·title="Release·Concept"><a·href="release_structure.html#idm1 |
166 | <li·title="Release·Concept"><a·href="release_structure.html#idm140231007847120">Release·Concept</a></li> |
167 |
<li·title="Release·Resource·File"><a·href="release_structure.html#idm1 |
167 | <li·title="Release·Resource·File"><a·href="release_structure.html#idm140231007840816">Release·Resource·File</a></li> |
168 |
<li·title="Generating·Boot·Scripts"><a·href="release_structure.html#idm1 |
168 | <li·title="Generating·Boot·Scripts"><a·href="release_structure.html#idm140231007823104">Generating·Boot·Scripts</a></li> |
169 |
<li·title="Creating·a·Release·Package"><a·href="release_structure.html#idm1 |
169 | <li·title="Creating·a·Release·Package"><a·href="release_structure.html#idm140231007811840">Creating·a·Release·Package</a></li> |
170 |
<li·title="Directory·Structure"><a·href="release_structure.html#idm1 |
170 | <li·title="Directory·Structure"><a·href="release_structure.html#idm140231007794016">Directory·Structure</a></li> |
171 | </ul> | 171 | </ul> |
172 | </li> | 172 | </li> |
173 | <li·id="no"·title="Release·Handling"·expanded="false">Release·Handling<ul> | 173 | <li·id="no"·title="Release·Handling"·expanded="false">Release·Handling<ul> |
174 | <li><a·href="release_handling.html"> | 174 | <li><a·href="release_handling.html"> |
175 | ··············Top·of·chapter | 175 | ··············Top·of·chapter |
176 | ············</a></li> | 176 | ············</a></li> |
177 |
<li·title="Release·Handling·Principles"><a·href="release_handling.html#idm1 |
177 | <li·title="Release·Handling·Principles"><a·href="release_handling.html#idm140231007763648">Release·Handling·Principles</a></li> |
178 |
<li·title="Requirements"><a·href="release_handling.html#idm1 |
178 | <li·title="Requirements"><a·href="release_handling.html#idm140231007734288">Requirements</a></li> |
179 |
<li·title="Distributed·Systems"><a·href="release_handling.html#idm1 |
179 | <li·title="Distributed·Systems"><a·href="release_handling.html#idm140231007723152">Distributed·Systems</a></li> |
180 |
<li·title="Release·Handling·Instructions"><a·href="release_handling.html#idm1 |
180 | <li·title="Release·Handling·Instructions"><a·href="release_handling.html#idm140231007719984">Release·Handling·Instructions</a></li> |
181 |
<li·title="Application·Upgrade·File"><a·href="release_handling.html#idm1 |
181 | <li·title="Application·Upgrade·File"><a·href="release_handling.html#idm140231007656768">Application·Upgrade·File</a></li> |
182 |
<li·title="Release·Upgrade·File"><a·href="release_handling.html#idm1 |
182 | <li·title="Release·Upgrade·File"><a·href="release_handling.html#idm140231007634928">Release·Upgrade·File</a></li> |
183 |
<li·title="Installing·a·Release"><a·href="release_handling.html#idm1 |
183 | <li·title="Installing·a·Release"><a·href="release_handling.html#idm140231007616192">Installing·a·Release</a></li> |
184 |
<li·title="Updating·Application·Specifications"><a·href="release_handling.html#idm1 |
184 | <li·title="Updating·Application·Specifications"><a·href="release_handling.html#idm140231007559712">Updating·Application·Specifications</a></li> |
185 | </ul> | 185 | </ul> |
186 | </li> | 186 | </li> |
187 | <li·id="no"·title="Appup·Cookbook"·expanded="false">Appup·Cookbook<ul> | 187 | <li·id="no"·title="Appup·Cookbook"·expanded="false">Appup·Cookbook<ul> |
188 | <li><a·href="appup_cookbook.html"> | 188 | <li><a·href="appup_cookbook.html"> |
189 | ··············Top·of·chapter | 189 | ··············Top·of·chapter |
190 | ············</a></li> | 190 | ············</a></li> |
191 |
<li·title="Changing·a·Functional·Module"><a·href="appup_cookbook.html#idm1 |
191 | <li·title="Changing·a·Functional·Module"><a·href="appup_cookbook.html#idm140231007537632">Changing·a·Functional·Module</a></li> |
192 |
<li·title="Changing·a·Residence·Module"><a·href="appup_cookbook.html#idm1 |
192 | <li·title="Changing·a·Residence·Module"><a·href="appup_cookbook.html#idm140231007534896">Changing·a·Residence·Module</a></li> |
193 |
<li·title="Changing·a·Callback·Module"><a·href="appup_cookbook.html#idm1 |
193 | <li·title="Changing·a·Callback·Module"><a·href="appup_cookbook.html#idm140231007530240">Changing·a·Callback·Module</a></li> |
194 |
<li·title="Changing·Internal·State"><a·href="appup_cookbook.html#idm1 |
194 | <li·title="Changing·Internal·State"><a·href="appup_cookbook.html#idm140231007524112">Changing·Internal·State</a></li> |
195 |
<li·title="Module·Dependencies"><a·href="appup_cookbook.html#idm1 |
195 | <li·title="Module·Dependencies"><a·href="appup_cookbook.html#idm140231007507968">Module·Dependencies</a></li> |
196 |
<li·title="Changing·Code·For·a·Special·Process"><a·href="appup_cookbook.html#idm1 |
196 | <li·title="Changing·Code·For·a·Special·Process"><a·href="appup_cookbook.html#idm140231007487488">Changing·Code·For·a·Special·Process</a></li> |
197 |
<li·title="Changing·a·Supervisor"><a·href="appup_cookbook.html#idm1 |
197 | <li·title="Changing·a·Supervisor"><a·href="appup_cookbook.html#idm140231007467472">Changing·a·Supervisor</a></li> |
198 |
<li·title="Adding·or·Deleting·a·Module"><a·href="appup_cookbook.html#idm1 |
198 | <li·title="Adding·or·Deleting·a·Module"><a·href="appup_cookbook.html#idm140231007437968">Adding·or·Deleting·a·Module</a></li> |
199 |
<li·title="Starting·or·Terminating·a·Process"><a·href="appup_cookbook.html#idm1 |
199 | <li·title="Starting·or·Terminating·a·Process"><a·href="appup_cookbook.html#idm140231007434928">Starting·or·Terminating·a·Process</a></li> |
200 |
<li·title="Adding·or·Removing·an·Application"><a·href="appup_cookbook.html#idm1 |
200 | <li·title="Adding·or·Removing·an·Application"><a·href="appup_cookbook.html#idm140231007432704">Adding·or·Removing·an·Application</a></li> |
201 |
<li·title="Restarting·an·Application"><a·href="appup_cookbook.html#idm1 |
201 | <li·title="Restarting·an·Application"><a·href="appup_cookbook.html#idm140231007429024">Restarting·an·Application</a></li> |
202 |
<li·title="Changing·an·Application·Specification"><a·href="appup_cookbook.html#idm1 |
202 | <li·title="Changing·an·Application·Specification"><a·href="appup_cookbook.html#idm140231007423968">Changing·an·Application·Specification</a></li> |
203 |
<li·title="Changing·Application·Configuration"><a·href="appup_cookbook.html#idm1 |
203 | <li·title="Changing·Application·Configuration"><a·href="appup_cookbook.html#idm140231007421104">Changing·Application·Configuration</a></li> |
204 |
<li·title="Changing·Included·Applications"><a·href="appup_cookbook.html#idm1 |
204 | <li·title="Changing·Included·Applications"><a·href="appup_cookbook.html#idm140231007417088">Changing·Included·Applications</a></li> |
205 |
<li·title="Changing·Non-Erlang·Code"><a·href="appup_cookbook.html#idm1 |
205 | <li·title="Changing·Non-Erlang·Code"><a·href="appup_cookbook.html#idm140231007388304">Changing·Non-Erlang·Code</a></li> |
206 |
<li·title="Emulator·Restart·and·Upgrade"><a·href="appup_cookbook.html#idm1 |
206 | <li·title="Emulator·Restart·and·Upgrade"><a·href="appup_cookbook.html#idm140231007378160">Emulator·Restart·and·Upgrade</a></li> |
207 |
<li·title="Emulator·Upgrade·from·pre·OTP·R15"><a·href="appup_cookbook.html#idm1 |
207 | <li·title="Emulator·Upgrade·from·pre·OTP·R15"><a·href="appup_cookbook.html#idm140231007368976">Emulator·Upgrade·from·pre·OTP·R15</a></li> |
208 | </ul> | 208 | </ul> |
209 | </li> | 209 | </li> |
210 | </ul> | 210 | </ul> |
211 | </div></div> | 211 | </div></div> |
212 | <div·id="content"> | 212 | <div·id="content"> |
213 | <div·class="innertube"> | 213 | <div·class="innertube"> |
214 | <h1>1 Overview</h1> | 214 | <h1>1 Overview</h1> |
215 | ·· | 215 | ·· |
216 | ··<p>The·<strong>OTP·Design·Principles</strong>·is·a·set·of·principles·for·how | 216 | ··<p>The·<strong>OTP·Design·Principles</strong>·is·a·set·of·principles·for·how |
217 | ····to·structure·Erlang·code·in·terms·of·processes,·modules·and | 217 | ····to·structure·Erlang·code·in·terms·of·processes,·modules·and |
218 | ····directories.</p> | 218 | ····directories.</p> |
219 |
··<h3><a·name="idm1 |
219 | ··<h3><a·name="idm140231008664592">1.1 |
220 | ········Supervision·Trees</a></h3> | 220 | ········Supervision·Trees</a></h3> |
221 | ···· | 221 | ···· |
222 | ····<p>A·basic·concept·in·Erlang/OTP·is·the·<strong>supervision·tree</strong>. | 222 | ····<p>A·basic·concept·in·Erlang/OTP·is·the·<strong>supervision·tree</strong>. |
223 | ······This·is·a·process·structuring·model·based·on·the·idea·of | 223 | ······This·is·a·process·structuring·model·based·on·the·idea·of |
224 | ······<strong>workers</strong>·and·<strong>supervisors</strong>.</p> | 224 | ······<strong>workers</strong>·and·<strong>supervisors</strong>.</p> |
225 | ····<ul> | 225 | ····<ul> |
226 | ······<li>Workers·are·processes·which·perform·computations,·that·is, | 226 | ······<li>Workers·are·processes·which·perform·computations,·that·is, |
Offset 240, 15 lines modified | Offset 240, 15 lines modified | ||
240 | ········ | 240 | ········ |
241 | ········Supervision·Tree</em> | 241 | ········Supervision·Tree</em> |
242 | ···· | 242 | ···· |
243 | ····<p>In·the·figure·above,·square·boxes·represents·supervisors·and | 243 | ····<p>In·the·figure·above,·square·boxes·represents·supervisors·and |
244 | ······circles·represent·workers.</p> | 244 | ······circles·represent·workers.</p> |
245 | ·· | 245 | ·· |
246 |
··<h3><a·name="idm1 |
246 | ··<h3><a·name="idm140231008672688">1.2 |
247 | ········Behaviours</a></h3> | 247 | ········Behaviours</a></h3> |
248 | ···· | 248 | ···· |
249 | ····<p>In·a·supervision·tree,·many·of·the·processes·have·similar | 249 | ····<p>In·a·supervision·tree,·many·of·the·processes·have·similar |
250 | ······structures,·they·follow·similar·patterns.·For·example, | 250 | ······structures,·they·follow·similar·patterns.·For·example, |
251 | ······the·supervisors·are·very·similar·in·structure.·The·only·difference | 251 | ······the·supervisors·are·very·similar·in·structure.·The·only·difference |
252 | ······between·them·is·which·child·processes·they·supervise.·Also,·many | 252 | ······between·them·is·which·child·processes·they·supervise.·Also,·many |
253 | ······of·the·workers·are·servers·in·a·server-client·relation,·finite | 253 | ······of·the·workers·are·servers·in·a·server-client·relation,·finite |
Offset 428, 15 lines modified | Offset 428, 15 lines modified | ||
428 | ... | 428 | ... |
429 | 3>·c(chs3). | 429 | 3>·c(chs3). |
430 | ./chs3.erl:10:·Warning:·undefined·call-back·function·handle_call/3 | 430 | ./chs3.erl:10:·Warning:·undefined·call-back·function·handle_call/3 |
431 | {ok,chs3}</pre></div> | 431 | {ok,chs3}</pre></div> |
432 | ·· | 432 | ·· |
433 |
··<h3><a·name="idm1 |
433 | ··<h3><a·name="idm140231008752016">1.3 |
434 | ········Applications</a></h3> | 434 | ········Applications</a></h3> |
435 | ···· | 435 | ···· |
436 | ····<p>Erlang/OTP·comes·with·a·number·of·components,·each·implementing | 436 | ····<p>Erlang/OTP·comes·with·a·number·of·components,·each·implementing |
437 | ······some·specific·functionality.·Components·are·with·Erlang/OTP | 437 | ······some·specific·functionality.·Components·are·with·Erlang/OTP |
438 | ······terminology·called·<strong>applications</strong>.·Examples·of·Erlang/OTP | 438 | ······terminology·called·<strong>applications</strong>.·Examples·of·Erlang/OTP |
439 | ······applications·are·Mnesia,·which·has·everything·needed·for | 439 | ······applications·are·Mnesia,·which·has·everything·needed·for |
440 | ······programming·database·services,·and·Debugger·which·is·used·to | 440 | ······programming·database·services,·and·Debugger·which·is·used·to |
Offset 450, 27 lines modified | Offset 450, 27 lines modified | ||
450 | ······of·a·library·application·is·STDLIB.</p> | 450 | ······of·a·library·application·is·STDLIB.</p> |
451 | ····<p>An·application·with·processes·is·easiest·implemented·as·a | 451 | ····<p>An·application·with·processes·is·easiest·implemented·as·a |
452 | ······supervision·tree·using·the·standard·behaviours.</p> | 452 | ······supervision·tree·using·the·standard·behaviours.</p> |
453 | ····<p>How·to·program·applications·is·described·in | 453 | ····<p>How·to·program·applications·is·described·in |
454 | ······<span·class="bold_code"><a·href="applications.html">Applications</a></span>.</p> | 454 | ······<span·class="bold_code"><a·href="applications.html">Applications</a></span>.</p> |
455 | ·· | 455 | ·· |
456 |
··<h3><a·name="idm1 |
456 | ··<h3><a·name="idm140231008757072">1.4 |
457 | ········Releases</a></h3> | 457 | ········Releases</a></h3> |
458 | ···· | 458 | ···· |
459 | ····<p>A·<strong>release</strong>·is·a·complete·system·made·out·from·a·subset·of | 459 | ····<p>A·<strong>release</strong>·is·a·complete·system·made·out·from·a·subset·of |
460 | ······the·Erlang/OTP·applications·and·a·set·of·user-specific | 460 | ······the·Erlang/OTP·applications·and·a·set·of·user-specific |
461 | ······applications.</p> | 461 | ······applications.</p> |
462 | ····<p>How·to·program·releases·is·described·in | 462 | ····<p>How·to·program·releases·is·described·in |
463 | ······<span·class="bold_code"><a·href="release_structure.html">Releases</a></span>.</p> | 463 | ······<span·class="bold_code"><a·href="release_structure.html">Releases</a></span>.</p> |
464 | ····<p>How·to·install·a·release·in·a·target·environment·is·described | 464 | ····<p>How·to·install·a·release·in·a·target·environment·is·described |
465 | ······in·the·chapter·about·Target·Systems·in·System·Principles.</p> | 465 | ······in·the·chapter·about·Target·Systems·in·System·Principles.</p> |
466 | ·· | 466 | ·· |
467 |
··<h3><a·name="idm1 |
467 | ··<h3><a·name="idm140231008760592">1.5 |
468 | ········Release·Handling</a></h3> | 468 | ········Release·Handling</a></h3> |
469 | ···· | 469 | ···· |
470 | ····<p><strong>Release·handling</strong>·is·upgrading·and·downgrading·between | 470 | ····<p><strong>Release·handling</strong>·is·upgrading·and·downgrading·between |
471 | ······different·versions·of·a·release,·in·a·(possibly)·running·system. | 471 | ······different·versions·of·a·release,·in·a·(possibly)·running·system. |
472 | ······How·to·do·this·is·described·in | 472 | ······How·to·do·this·is·described·in |
473 | ······<span·class="bold_code"><a·href="release_handling.html">Release·Handling</a></span>.</p> | 473 | ······<span·class="bold_code"><a·href="release_handling.html">Release·Handling</a></span>.</p> |
474 | ·· | 474 | ·· |
Offset 47, 178 lines modified | Offset 47, 178 lines modified | ||
47 | <img·alt="Erlang·logo"·src="../erlang-logo.png"><br><small><a·href="users_guide.html">User's·Guide</a><br><a·href="../pdf/otp-system-documentation-6.3.pdf">PDF</a><br><a·href="../index.html">Top</a></small><p><strong>OTP·Design·Principles</strong><br><strong>User's·Guide</strong><br><small>Version·6.3</small></p> | 47 | <img·alt="Erlang·logo"·src="../erlang-logo.png"><br><small><a·href="users_guide.html">User's·Guide</a><br><a·href="../pdf/otp-system-documentation-6.3.pdf">PDF</a><br><a·href="../index.html">Top</a></small><p><strong>OTP·Design·Principles</strong><br><strong>User's·Guide</strong><br><small>Version·6.3</small></p> |
48 | <br><a·href="javascript:openAllFlips()">Expand·All</a><br><a·href="javascript:closeAllFlips()">Contract·All</a><p><small><strong>Chapters</strong></small></p> | 48 | <br><a·href="javascript:openAllFlips()">Expand·All</a><br><a·href="javascript:closeAllFlips()">Contract·All</a><p><small><strong>Chapters</strong></small></p> |
49 | <ul·class="flipMenu"·imagepath="../js/flipmenu"> | 49 | <ul·class="flipMenu"·imagepath="../js/flipmenu"> |
50 | <li·id="no"·title="Overview"·expanded="false">Overview<ul> | 50 | <li·id="no"·title="Overview"·expanded="false">Overview<ul> |
51 | <li><a·href="des_princ.html"> | 51 | <li><a·href="des_princ.html"> |
52 | ··············Top·of·chapter | 52 | ··············Top·of·chapter |
53 | ············</a></li> | 53 | ············</a></li> |
54 |
<li·title="Supervision·Trees"><a·href="des_princ.html#idm1 |
54 | <li·title="Supervision·Trees"><a·href="des_princ.html#idm140231008664592">Supervision·Trees</a></li> |
55 |
<li·title="Behaviours"><a·href="des_princ.html#idm1 |
55 | <li·title="Behaviours"><a·href="des_princ.html#idm140231008672688">Behaviours</a></li> |
56 |
<li·title="Applications"><a·href="des_princ.html#idm1 |
56 | <li·title="Applications"><a·href="des_princ.html#idm140231008752016">Applications</a></li> |
57 |
<li·title="Releases"><a·href="des_princ.html#idm1 |
57 | <li·title="Releases"><a·href="des_princ.html#idm140231008757072">Releases</a></li> |
58 |
<li·title="Release·Handling"><a·href="des_princ.html#idm1 |
58 | <li·title="Release·Handling"><a·href="des_princ.html#idm140231008760592">Release·Handling</a></li> |
59 | </ul> | 59 | </ul> |
60 | </li> | 60 | </li> |
61 | <li·id="no"·title="Gen_Server·Behaviour"·expanded="false">Gen_Server·Behaviour<ul> | 61 | <li·id="no"·title="Gen_Server·Behaviour"·expanded="false">Gen_Server·Behaviour<ul> |
62 | <li><a·href="gen_server_concepts.html"> | 62 | <li><a·href="gen_server_concepts.html"> |
63 | ··············Top·of·chapter | 63 | ··············Top·of·chapter |
64 | ············</a></li> | 64 | ············</a></li> |
65 |
<li·title="Client-Server·Principles"><a·href="gen_server_concepts.html#idm1 |
65 | <li·title="Client-Server·Principles"><a·href="gen_server_concepts.html#idm140231008770128">Client-Server·Principles</a></li> |
66 |
<li·title="Example"><a·href="gen_server_concepts.html#idm1 |
66 | <li·title="Example"><a·href="gen_server_concepts.html#idm140231008697632">Example</a></li> |
67 |
<li·title="Starting·a·Gen_Server"><a·href="gen_server_concepts.html#idm1 |
67 | <li·title="Starting·a·Gen_Server"><a·href="gen_server_concepts.html#idm140231008702000">Starting·a·Gen_Server</a></li> |
68 |
<li·title="Synchronous·Requests·-·Call"><a·href="gen_server_concepts.html#idm1 |
68 | <li·title="Synchronous·Requests·-·Call"><a·href="gen_server_concepts.html#idm140231008776224">Synchronous·Requests·-·Call</a></li> |
69 |
<li·title="Asynchronous·Requests·-·Cast"><a·href="gen_server_concepts.html#idm1 |
69 | <li·title="Asynchronous·Requests·-·Cast"><a·href="gen_server_concepts.html#idm140231008786432">Asynchronous·Requests·-·Cast</a></li> |
70 |
<li·title="Stopping"><a·href="gen_server_concepts.html#idm1 |
70 | <li·title="Stopping"><a·href="gen_server_concepts.html#idm140231009075376">Stopping</a></li> |
71 |
<li·title="Handling·Other·Messages"><a·href="gen_server_concepts.html#idm1 |
71 | <li·title="Handling·Other·Messages"><a·href="gen_server_concepts.html#idm140231008621744">Handling·Other·Messages</a></li> |
72 | </ul> | 72 | </ul> |
73 | </li> | 73 | </li> |
74 | <li·id="no"·title="Gen_Fsm·Behaviour"·expanded="false">Gen_Fsm·Behaviour<ul> | 74 | <li·id="no"·title="Gen_Fsm·Behaviour"·expanded="false">Gen_Fsm·Behaviour<ul> |
75 | <li><a·href="fsm.html"> | 75 | <li><a·href="fsm.html"> |
76 | ··············Top·of·chapter | 76 | ··············Top·of·chapter |
77 | ············</a></li> | 77 | ············</a></li> |
78 |
<li·title="Finite·State·Machines"><a·href="fsm.html#idm1 |
78 | <li·title="Finite·State·Machines"><a·href="fsm.html#idm140231009090752">Finite·State·Machines</a></li> |
79 |
<li·title="Example"><a·href="fsm.html#idm1 |
79 | <li·title="Example"><a·href="fsm.html#idm140231008799248">Example</a></li> |
80 |
<li·title="Starting·a·Gen_Fsm"><a·href="fsm.html#idm1 |
80 | <li·title="Starting·a·Gen_Fsm"><a·href="fsm.html#idm140231009551600">Starting·a·Gen_Fsm</a></li> |
81 |
<li·title="Notifying·About·Events"><a·href="fsm.html#idm1 |
81 | <li·title="Notifying·About·Events"><a·href="fsm.html#idm140231009115360">Notifying·About·Events</a></li> |
82 |
<li·title="Timeouts"><a·href="fsm.html#idm1 |
82 | <li·title="Timeouts"><a·href="fsm.html#idm140231009808544">Timeouts</a></li> |
83 |
<li·title="All·State·Events"><a·href="fsm.html#idm1 |
83 | <li·title="All·State·Events"><a·href="fsm.html#idm140231009303152">All·State·Events</a></li> |
84 |
<li·title="Stopping"><a·href="fsm.html#idm1 |
84 | <li·title="Stopping"><a·href="fsm.html#idm140231008912976">Stopping</a></li> |
85 |
<li·title="Handling·Other·Messages"><a·href="fsm.html#idm1 |
85 | <li·title="Handling·Other·Messages"><a·href="fsm.html#idm140231008432688">Handling·Other·Messages</a></li> |
86 | </ul> | 86 | </ul> |
87 | </li> | 87 | </li> |
88 | <li·id="no"·title="Gen_Event·Behaviour"·expanded="false">Gen_Event·Behaviour<ul> | 88 | <li·id="no"·title="Gen_Event·Behaviour"·expanded="false">Gen_Event·Behaviour<ul> |
89 | <li><a·href="events.html"> | 89 | <li><a·href="events.html"> |
90 | ··············Top·of·chapter | 90 | ··············Top·of·chapter |
91 | ············</a></li> | 91 | ············</a></li> |
92 |
<li·title="Event·Handling·Principles"><a·href="events.html#idm1 |
92 | <li·title="Event·Handling·Principles"><a·href="events.html#idm140231009179392">Event·Handling·Principles</a></li> |
93 |
<li·title="Example"><a·href="events.html#idm1 |
93 | <li·title="Example"><a·href="events.html#idm140231008417152">Example</a></li> |
94 |
<li·title="Starting·an·Event·Manager"><a·href="events.html#idm1 |
94 | <li·title="Starting·an·Event·Manager"><a·href="events.html#idm140231008413136">Starting·an·Event·Manager</a></li> |
95 |
<li·title="Adding·an·Event·Handler"><a·href="events.html#idm1 |
95 | <li·title="Adding·an·Event·Handler"><a·href="events.html#idm140231009388752">Adding·an·Event·Handler</a></li> |
96 |
<li·title="Notifying·About·Events"><a·href="events.html#idm1 |
96 | <li·title="Notifying·About·Events"><a·href="events.html#idm140231008728512">Notifying·About·Events</a></li> |
97 |
<li·title="Deleting·an·Event·Handler"><a·href="events.html#idm1 |
97 | <li·title="Deleting·an·Event·Handler"><a·href="events.html#idm140231008720736">Deleting·an·Event·Handler</a></li> |
98 |
<li·title="Stopping"><a·href="events.html#idm1 |
98 | <li·title="Stopping"><a·href="events.html#idm140231008689408">Stopping</a></li> |
99 |
<li·title="Handling·Other·Messages"><a·href="events.html#idm1 |
99 | <li·title="Handling·Other·Messages"><a·href="events.html#idm140231008683248">Handling·Other·Messages</a></li> |
100 | </ul> | 100 | </ul> |
101 | </li> | 101 | </li> |
102 | <li·id="no"·title="Supervisor·Behaviour"·expanded="false">Supervisor·Behaviour<ul> | 102 | <li·id="no"·title="Supervisor·Behaviour"·expanded="false">Supervisor·Behaviour<ul> |
103 | <li><a·href="sup_princ.html"> | 103 | <li><a·href="sup_princ.html"> |
104 | ··············Top·of·chapter | 104 | ··············Top·of·chapter |
105 | ············</a></li> | 105 | ············</a></li> |
106 |
<li·title="Supervision·Principles"><a·href="sup_princ.html#idm1 |
106 | <li·title="Supervision·Principles"><a·href="sup_princ.html#idm140231008291744">Supervision·Principles</a></li> |
107 |
<li·title="Example"><a·href="sup_princ.html#idm1 |
107 | <li·title="Example"><a·href="sup_princ.html#idm140231009682528">Example</a></li> |
108 |
<li·title="Restart·Strategy"><a·href="sup_princ.html#idm1 |
108 | <li·title="Restart·Strategy"><a·href="sup_princ.html#idm140231009629632">Restart·Strategy</a></li> |
109 |
<li·title="Maximum·Restart·Frequency"><a·href="sup_princ.html#idm1 |
109 | <li·title="Maximum·Restart·Frequency"><a·href="sup_princ.html#idm140231008896368">Maximum·Restart·Frequency</a></li> |
110 |
<li·title="Child·Specification"><a·href="sup_princ.html#idm1 |
110 | <li·title="Child·Specification"><a·href="sup_princ.html#idm140231008285744">Child·Specification</a></li> |
111 |
<li·title="Starting·a·Supervisor"><a·href="sup_princ.html#idm1 |
111 | <li·title="Starting·a·Supervisor"><a·href="sup_princ.html#idm140231008253328">Starting·a·Supervisor</a></li> |
112 |
<li·title="Adding·a·Child·Process"><a·href="sup_princ.html#idm1 |
112 | <li·title="Adding·a·Child·Process"><a·href="sup_princ.html#idm140231008242208">Adding·a·Child·Process</a></li> |
113 |
<li·title="Stopping·a·Child·Process"><a·href="sup_princ.html#idm1 |
113 | <li·title="Stopping·a·Child·Process"><a·href="sup_princ.html#idm140231008237824">Stopping·a·Child·Process</a></li> |
114 |
<li·title="Simple-One-For-One·Supervisors"><a·href="sup_princ.html#idm1 |
114 | <li·title="Simple-One-For-One·Supervisors"><a·href="sup_princ.html#idm140231008233024">Simple-One-For-One·Supervisors</a></li> |
115 |
<li·title="Stopping"><a·href="sup_princ.html#idm1 |
115 | <li·title="Stopping"><a·href="sup_princ.html#idm140231008218080">Stopping</a></li> |
116 | </ul> | 116 | </ul> |
117 | </li> | 117 | </li> |
118 | <li·id="no"·title="Sys·and·Proc_Lib"·expanded="false">Sys·and·Proc_Lib<ul> | 118 | <li·id="no"·title="Sys·and·Proc_Lib"·expanded="false">Sys·and·Proc_Lib<ul> |
119 | <li><a·href="spec_proc.html"> | 119 | <li><a·href="spec_proc.html"> |
120 | ··············Top·of·chapter | 120 | ··············Top·of·chapter |
121 | ············</a></li> | 121 | ············</a></li> |
122 |
<li·title="Simple·Debugging"><a·href="spec_proc.html#idm1 |
122 | <li·title="Simple·Debugging"><a·href="spec_proc.html#idm140231008206384">Simple·Debugging</a></li> |
123 |
<li·title="Special·Processes"><a·href="spec_proc.html#idm1 |
123 | <li·title="Special·Processes"><a·href="spec_proc.html#idm140231008196256">Special·Processes</a></li> |
124 |
<li·title="User-Defined·Behaviours"><a·href="spec_proc.html#idm1 |
124 | <li·title="User-Defined·Behaviours"><a·href="spec_proc.html#idm140231008119008">User-Defined·Behaviours</a></li> |
125 | </ul> | 125 | </ul> |
126 | </li> | 126 | </li> |
127 | <li·id="no"·title="Applications"·expanded="false">Applications<ul> | 127 | <li·id="no"·title="Applications"·expanded="false">Applications<ul> |
128 | <li><a·href="applications.html"> | 128 | <li><a·href="applications.html"> |
129 | ··············Top·of·chapter | 129 | ··············Top·of·chapter |
130 | ············</a></li> | 130 | ············</a></li> |
131 |
<li·title="Application·Concept"><a·href="applications.html#idm1 |
131 | <li·title="Application·Concept"><a·href="applications.html#idm140231008095264">Application·Concept</a></li> |
132 |
<li·title="Application·Callback·Module"><a·href="applications.html#idm1 |
132 | <li·title="Application·Callback·Module"><a·href="applications.html#idm140231008087216">Application·Callback·Module</a></li> |
133 |
<li·title="Application·Resource·File"><a·href="applications.html#idm1 |
133 | <li·title="Application·Resource·File"><a·href="applications.html#idm140231008073536">Application·Resource·File</a></li> |
134 |
<li·title="Directory·Structure"><a·href="applications.html#idm1 |
134 | <li·title="Directory·Structure"><a·href="applications.html#idm140231008043200">Directory·Structure</a></li> |
135 |
<li·title="Application·Controller"><a·href="applications.html#idm1 |
135 | <li·title="Application·Controller"><a·href="applications.html#idm140231008028064">Application·Controller</a></li> |
136 |
<li·title="Loading·and·Unloading·Applications"><a·href="applications.html#idm1 |
136 | <li·title="Loading·and·Unloading·Applications"><a·href="applications.html#idm140231008024128">Loading·and·Unloading·Applications</a></li> |
137 |
<li·title="Starting·and·Stopping·Applications"><a·href="applications.html#idm1 |
137 | <li·title="Starting·and·Stopping·Applications"><a·href="applications.html#idm140231008016672">Starting·and·Stopping·Applications</a></li> |
138 |
<li·title="Configuring·an·Application"><a·href="applications.html#idm1 |
138 | <li·title="Configuring·an·Application"><a·href="applications.html#idm140231008006160">Configuring·an·Application</a></li> |
139 |
<li·title="Application·Start·Types"><a·href="applications.html#idm1 |
139 | <li·title="Application·Start·Types"><a·href="applications.html#idm140231007982224">Application·Start·Types</a></li> |
140 | </ul> | 140 | </ul> |
141 | </li> | 141 | </li> |
142 | <li·id="no"·title="Included·Applications"·expanded="false">Included·Applications<ul> | 142 | <li·id="no"·title="Included·Applications"·expanded="false">Included·Applications<ul> |
143 | <li><a·href="included_applications.html"> | 143 | <li><a·href="included_applications.html"> |
144 | ··············Top·of·chapter | 144 | ··············Top·of·chapter |
145 | ············</a></li> | 145 | ············</a></li> |
146 |
<li·title="Definition"><a·href="included_applications.html#idm1 |
146 | <li·title="Definition"><a·href="included_applications.html#idm140231007965456">Definition</a></li> |
147 |
<li·title="Specifying·Included·Applications"><a·href="included_applications.html#idm1 |
147 | <li·title="Specifying·Included·Applications"><a·href="included_applications.html#idm140231007957600">Specifying·Included·Applications</a></li> |
148 |
<li·title="Synchronizing·Processes·During·Startup"><a·href="included_applications.html#idm1 |
148 | <li·title="Synchronizing·Processes·During·Startup"><a·href="included_applications.html#idm140231007954560">Synchronizing·Processes·During·Startup</a></li> |
149 | </ul> | 149 | </ul> |
150 | </li> | 150 | </li> |
151 | <li·id="loadscrollpos"·title="Distributed·Applications"·expanded="true">Distributed·Applications<ul> | 151 | <li·id="loadscrollpos"·title="Distributed·Applications"·expanded="true">Distributed·Applications<ul> |
152 | <li><a·href="distributed_applications.html"> | 152 | <li><a·href="distributed_applications.html"> |
153 | ··············Top·of·chapter | 153 | ··············Top·of·chapter |
154 | ············</a></li> | 154 | ············</a></li> |
155 |
<li·title="Definition"><a·href="distributed_applications.html#idm1 |
155 | <li·title="Definition"><a·href="distributed_applications.html#idm140231007928960">Definition</a></li> |
156 |
<li·title="Specifying·Distributed·Applications"><a·href="distributed_applications.html#idm1 |
156 | <li·title="Specifying·Distributed·Applications"><a·href="distributed_applications.html#idm140231007924640">Specifying·Distributed·Applications</a></li> |
157 |
<li·title="Starting·and·Stopping·Distributed·Applications"><a·href="distributed_applications.html#idm1 |
157 | <li·title="Starting·and·Stopping·Distributed·Applications"><a·href="distributed_applications.html#idm140231007899872">Starting·and·Stopping·Distributed·Applications</a></li> |
158 |
<li·title="Failover"><a·href="distributed_applications.html#idm1 |
158 | <li·title="Failover"><a·href="distributed_applications.html#idm140231007887632">Failover</a></li> |
159 |
<li·title="Takeover"><a·href="distributed_applications.html#idm1 |
159 | <li·title="Takeover"><a·href="distributed_applications.html#idm140231007870560">Takeover</a></li> |
160 | </ul> | 160 | </ul> |
161 | </li> | 161 | </li> |
162 | <li·id="no"·title="Releases"·expanded="false">Releases<ul> | 162 | <li·id="no"·title="Releases"·expanded="false">Releases<ul> |
163 | <li><a·href="release_structure.html"> | 163 | <li><a·href="release_structure.html"> |
164 | ··············Top·of·chapter | 164 | ··············Top·of·chapter |
165 | ············</a></li> | 165 | ············</a></li> |
166 |
<li·title="Release·Concept"><a·href="release_structure.html#idm1 |
166 | <li·title="Release·Concept"><a·href="release_structure.html#idm140231007847120">Release·Concept</a></li> |
167 |
<li·title="Release·Resource·File"><a·href="release_structure.html#idm1 |
167 | <li·title="Release·Resource·File"><a·href="release_structure.html#idm140231007840816">Release·Resource·File</a></li> |
168 |
<li·title="Generating·Boot·Scripts"><a·href="release_structure.html#idm1 |
168 | <li·title="Generating·Boot·Scripts"><a·href="release_structure.html#idm140231007823104">Generating·Boot·Scripts</a></li> |
169 |
<li·title="Creating·a·Release·Package"><a·href="release_structure.html#idm1 |
169 | <li·title="Creating·a·Release·Package"><a·href="release_structure.html#idm140231007811840">Creating·a·Release·Package</a></li> |
170 |
<li·title="Directory·Structure"><a·href="release_structure.html#idm1 |
170 | <li·title="Directory·Structure"><a·href="release_structure.html#idm140231007794016">Directory·Structure</a></li> |
171 | </ul> | 171 | </ul> |
172 | </li> | 172 | </li> |
173 | <li·id="no"·title="Release·Handling"·expanded="false">Release·Handling<ul> | 173 | <li·id="no"·title="Release·Handling"·expanded="false">Release·Handling<ul> |
174 | <li><a·href="release_handling.html"> | 174 | <li><a·href="release_handling.html"> |
175 | ··············Top·of·chapter | 175 | ··············Top·of·chapter |
176 | ············</a></li> | 176 | ············</a></li> |
177 |
<li·title="Release·Handling·Principles"><a·href="release_handling.html#idm1 |
177 | <li·title="Release·Handling·Principles"><a·href="release_handling.html#idm140231007763648">Release·Handling·Principles</a></li> |
178 |
<li·title="Requirements"><a·href="release_handling.html#idm1 |
178 | <li·title="Requirements"><a·href="release_handling.html#idm140231007734288">Requirements</a></li> |
179 |
<li·title="Distributed·Systems"><a·href="release_handling.html#idm1 |
179 | <li·title="Distributed·Systems"><a·href="release_handling.html#idm140231007723152">Distributed·Systems</a></li> |
180 |
<li·title="Release·Handling·Instructions"><a·href="release_handling.html#idm1 |
180 | <li·title="Release·Handling·Instructions"><a·href="release_handling.html#idm140231007719984">Release·Handling·Instructions</a></li> |
181 |
<li·title="Application·Upgrade·File"><a·href="release_handling.html#idm1 |
181 | <li·title="Application·Upgrade·File"><a·href="release_handling.html#idm140231007656768">Application·Upgrade·File</a></li> |
182 |
<li·title="Release·Upgrade·File"><a·href="release_handling.html#idm1 |
182 | <li·title="Release·Upgrade·File"><a·href="release_handling.html#idm140231007634928">Release·Upgrade·File</a></li> |
183 |
<li·title="Installing·a·Release"><a·href="release_handling.html#idm1 |
183 | <li·title="Installing·a·Release"><a·href="release_handling.html#idm140231007616192">Installing·a·Release</a></li> |
184 |
<li·title="Updating·Application·Specifications"><a·href="release_handling.html#idm1 |
184 | <li·title="Updating·Application·Specifications"><a·href="release_handling.html#idm140231007559712">Updating·Application·Specifications</a></li> |
185 | </ul> | 185 | </ul> |
186 | </li> | 186 | </li> |
187 | <li·id="no"·title="Appup·Cookbook"·expanded="false">Appup·Cookbook<ul> | 187 | <li·id="no"·title="Appup·Cookbook"·expanded="false">Appup·Cookbook<ul> |
188 | <li><a·href="appup_cookbook.html"> | 188 | <li><a·href="appup_cookbook.html"> |
189 | ··············Top·of·chapter | 189 | ··············Top·of·chapter |
190 | ············</a></li> | 190 | ············</a></li> |
191 |
<li·title="Changing·a·Functional·Module"><a·href="appup_cookbook.html#idm1 |
191 | <li·title="Changing·a·Functional·Module"><a·href="appup_cookbook.html#idm140231007537632">Changing·a·Functional·Module</a></li> |
192 |
<li·title="Changing·a·Residence·Module"><a·href="appup_cookbook.html#idm1 |
192 | <li·title="Changing·a·Residence·Module"><a·href="appup_cookbook.html#idm140231007534896">Changing·a·Residence·Module</a></li> |
193 |
<li·title="Changing·a·Callback·Module"><a·href="appup_cookbook.html#idm1 |
193 | <li·title="Changing·a·Callback·Module"><a·href="appup_cookbook.html#idm140231007530240">Changing·a·Callback·Module</a></li> |
194 |
<li·title="Changing·Internal·State"><a·href="appup_cookbook.html#idm1 |
194 | <li·title="Changing·Internal·State"><a·href="appup_cookbook.html#idm140231007524112">Changing·Internal·State</a></li> |
195 |
<li·title="Module·Dependencies"><a·href="appup_cookbook.html#idm1 |
195 | <li·title="Module·Dependencies"><a·href="appup_cookbook.html#idm140231007507968">Module·Dependencies</a></li> |
196 |
<li·title="Changing·Code·For·a·Special·Process"><a·href="appup_cookbook.html#idm1 |
196 | <li·title="Changing·Code·For·a·Special·Process"><a·href="appup_cookbook.html#idm140231007487488">Changing·Code·For·a·Special·Process</a></li> |
197 |
<li·title="Changing·a·Supervisor"><a·href="appup_cookbook.html#idm1 |
197 | <li·title="Changing·a·Supervisor"><a·href="appup_cookbook.html#idm140231007467472">Changing·a·Supervisor</a></li> |
198 |
<li·title="Adding·or·Deleting·a·Module"><a·href="appup_cookbook.html#idm1 |
198 | <li·title="Adding·or·Deleting·a·Module"><a·href="appup_cookbook.html#idm140231007437968">Adding·or·Deleting·a·Module</a></li> |
199 |
<li·title="Starting·or·Terminating·a·Process"><a·href="appup_cookbook.html#idm1 |
199 | <li·title="Starting·or·Terminating·a·Process"><a·href="appup_cookbook.html#idm140231007434928">Starting·or·Terminating·a·Process</a></li> |
200 |
<li·title="Adding·or·Removing·an·Application"><a·href="appup_cookbook.html#idm1 |
200 | <li·title="Adding·or·Removing·an·Application"><a·href="appup_cookbook.html#idm140231007432704">Adding·or·Removing·an·Application</a></li> |
201 |
<li·title="Restarting·an·Application"><a·href="appup_cookbook.html#idm1 |
201 | <li·title="Restarting·an·Application"><a·href="appup_cookbook.html#idm140231007429024">Restarting·an·Application</a></li> |
202 |
<li·title="Changing·an·Application·Specification"><a·href="appup_cookbook.html#idm1 |
202 | <li·title="Changing·an·Application·Specification"><a·href="appup_cookbook.html#idm140231007423968">Changing·an·Application·Specification</a></li> |
203 |
<li·title="Changing·Application·Configuration"><a·href="appup_cookbook.html#idm1 |
203 | <li·title="Changing·Application·Configuration"><a·href="appup_cookbook.html#idm140231007421104">Changing·Application·Configuration</a></li> |
204 |
<li·title="Changing·Included·Applications"><a·href="appup_cookbook.html#idm1 |
204 | <li·title="Changing·Included·Applications"><a·href="appup_cookbook.html#idm140231007417088">Changing·Included·Applications</a></li> |
205 |
<li·title="Changing·Non-Erlang·Code"><a·href="appup_cookbook.html#idm1 |
205 | <li·title="Changing·Non-Erlang·Code"><a·href="appup_cookbook.html#idm140231007388304">Changing·Non-Erlang·Code</a></li> |
206 |
<li·title="Emulator·Restart·and·Upgrade"><a·href="appup_cookbook.html#idm1 |
206 | <li·title="Emulator·Restart·and·Upgrade"><a·href="appup_cookbook.html#idm140231007378160">Emulator·Restart·and·Upgrade</a></li> |
207 |
<li·title="Emulator·Upgrade·from·pre·OTP·R15"><a·href="appup_cookbook.html#idm1 |
207 | <li·title="Emulator·Upgrade·from·pre·OTP·R15"><a·href="appup_cookbook.html#idm140231007368976">Emulator·Upgrade·from·pre·OTP·R15</a></li> |
208 | </ul> | 208 | </ul> |
209 | </li> | 209 | </li> |
210 | </ul> | 210 | </ul> |
211 | </div></div> | 211 | </div></div> |
212 | <div·id="content"> | 212 | <div·id="content"> |
213 | <div·class="innertube"> | 213 | <div·class="innertube"> |
214 | <h1>9 Distributed·Applications</h1> | 214 | <h1>9 Distributed·Applications</h1> |
215 | ·· | 215 | ·· |
216 |
··<h3><a·name="idm1 |
216 | ··<h3><a·name="idm140231007928960">9.1 |
217 | ········Definition</a></h3> | 217 | ········Definition</a></h3> |
218 | ···· | 218 | ···· |
219 | ····<p>In·a·distributed·system·with·several·Erlang·nodes,·there·may·be | 219 | ····<p>In·a·distributed·system·with·several·Erlang·nodes,·there·may·be |
220 | ······a·need·to·control·applications·in·a·distributed·manner.·If | 220 | ······a·need·to·control·applications·in·a·distributed·manner.·If |
221 | ······the·node,·where·a·certain·application·is·running,·goes·down, | 221 | ······the·node,·where·a·certain·application·is·running,·goes·down, |
222 | ······the·application·should·be·restarted·at·another·node.</p> | 222 | ······the·application·should·be·restarted·at·another·node.</p> |
223 | ····<p>Such·an·application·is·called·a·<strong>distributed·application</strong>. | 223 | ····<p>Such·an·application·is·called·a·<strong>distributed·application</strong>. |
Offset 229, 15 lines modified | Offset 229, 15 lines modified | ||
229 | ······addressing·mechanism·is·required·to·ensure·that·it·can·be | 229 | ······addressing·mechanism·is·required·to·ensure·that·it·can·be |
230 | ······addressed·by·other·applications,·regardless·on·which·node·it | 230 | ······addressed·by·other·applications,·regardless·on·which·node·it |
231 | ······currently·executes.·This·issue·is·not·addressed·here,·but·the | 231 | ······currently·executes.·This·issue·is·not·addressed·here,·but·the |
232 | ······Kernel·module·<span·class="code">global</span>·or·STDLIB·module·<span·class="code">pg</span>·can·be | 232 | ······Kernel·module·<span·class="code">global</span>·or·STDLIB·module·<span·class="code">pg</span>·can·be |
233 | ······used·for·this·purpose.</p> | 233 | ······used·for·this·purpose.</p> |
234 | ·· | 234 | ·· |
235 |
··<h3><a·name="idm1 |
235 | ··<h3><a·name="idm140231007924640">9.2 |
236 | ········Specifying·Distributed·Applications</a></h3> | 236 | ········Specifying·Distributed·Applications</a></h3> |
237 | ···· | 237 | ···· |
238 | ····<p>Distributed·applications·are·controlled·by·both·the·application | 238 | ····<p>Distributed·applications·are·controlled·by·both·the·application |
239 | ······controller·and·a·distributed·application·controller·process, | 239 | ······controller·and·a·distributed·application·controller·process, |
240 | ······<span·class="code">dist_ac</span>.·Both·these·processes·are·part·of·the·<span·class="code">kernel</span> | 240 | ······<span·class="code">dist_ac</span>.·Both·these·processes·are·part·of·the·<span·class="code">kernel</span> |
241 | ······application.·Therefore,·distributed·applications·are·specified·by | 241 | ······application.·Therefore,·distributed·applications·are·specified·by |
242 | ······configuring·the·<span·class="code">kernel</span>·application,·using·the·following | 242 | ······configuring·the·<span·class="code">kernel</span>·application,·using·the·following |
Offset 299, 15 lines modified | Offset 299, 15 lines modified | ||
299 | ······<p>All·involved·nodes·must·have·the·same·value·for | 299 | ······<p>All·involved·nodes·must·have·the·same·value·for |
300 | ········<span·class="code">distributed</span>·and·<span·class="code">sync_nodes_timeout</span>,·or | 300 | ········<span·class="code">distributed</span>·and·<span·class="code">sync_nodes_timeout</span>,·or |
301 | ········the·behaviour·of·the·system·is·undefined.</p> | 301 | ········the·behaviour·of·the·system·is·undefined.</p> |
302 | ····</p></div> | 302 | ····</p></div> |
303 | </div> | 303 | </div> |
304 | ·· | 304 | ·· |
305 |
··<h3><a·name="idm1 |
305 | ··<h3><a·name="idm140231007899872">9.3 |
306 | ········Starting·and·Stopping·Distributed·Applications</a></h3> | 306 | ········Starting·and·Stopping·Distributed·Applications</a></h3> |
307 | ···· | 307 | ···· |
308 | ····<p>When·all·involved·(mandatory)·nodes·have·been·started, | 308 | ····<p>When·all·involved·(mandatory)·nodes·have·been·started, |
309 | ······the·distributed·application·can·be·started·by·calling | 309 | ······the·distributed·application·can·be·started·by·calling |
310 | ······<span·class="code">application:start(Application)</span>·at·<strong>all·of·these·nodes.</strong></p> | 310 | ······<span·class="code">application:start(Application)</span>·at·<strong>all·of·these·nodes.</strong></p> |
311 | ····<p>It·is·of·course·also·possible·to·use·a·boot·script·(see | 311 | ····<p>It·is·of·course·also·possible·to·use·a·boot·script·(see |
312 | ······<span·class="bold_code"><a·href="release_structure.html">Releases</a></span>)·which | 312 | ······<span·class="bold_code"><a·href="release_structure.html">Releases</a></span>)·which |
Offset 337, 15 lines modified | Offset 337, 15 lines modified | ||
337 | ········ | 337 | ········ |
338 | ········Application·myapp·-·Situation·1</em> | 338 | ········Application·myapp·-·Situation·1</em> |
339 | ···· | 339 | ···· |
340 | ····<p>Similarly,·the·application·must·be·stopped·by·calling | 340 | ····<p>Similarly,·the·application·must·be·stopped·by·calling |
341 | ······<span·class="code">application:stop(Application)</span>·at·all·involved·nodes.</p> | 341 | ······<span·class="code">application:stop(Application)</span>·at·all·involved·nodes.</p> |
342 | ·· | 342 | ·· |
343 |
··<h3><a·name="idm1 |
343 | ··<h3><a·name="idm140231007887632">9.4 |
344 | ········Failover</a></h3> | 344 | ········Failover</a></h3> |
345 | ···· | 345 | ···· |
346 | ····<p>If·the·node·where·the·application·is·running·goes·down, | 346 | ····<p>If·the·node·where·the·application·is·running·goes·down, |
347 | ······the·application·is·restarted·(after·the·specified·timeout)·at | 347 | ······the·application·is·restarted·(after·the·specified·timeout)·at |
348 | ······the·first·node,·specified·by·the·<span·class="code">distributed</span>·configuration | 348 | ······the·first·node,·specified·by·the·<span·class="code">distributed</span>·configuration |
349 | ······parameter,·which·is·up·and·running.·This·is·called·a | 349 | ······parameter,·which·is·up·and·running.·This·is·called·a |
350 | ······<strong>failover</strong>.</p> | 350 | ······<strong>failover</strong>.</p> |
Offset 380, 15 lines modified | Offset 380, 15 lines modified | ||
380 | ······<em>Figure | 380 | ······<em>Figure |
381 | ········9.3: | 381 | ········9.3: |
382 | ········ | 382 | ········ |
383 | ········Application·myapp·-·Situation·3</em> | 383 | ········Application·myapp·-·Situation·3</em> |
384 | ···· | 384 | ···· |
385 | ·· | 385 | ·· |
386 |
··<h3><a·name="idm1 |
386 | ··<h3><a·name="idm140231007870560">9.5 |
387 | ········Takeover</a></h3> | 387 | ········Takeover</a></h3> |
388 | ···· | 388 | ···· |
389 | ····<p>If·a·node·is·started,·which·has·higher·priority·according | 389 | ····<p>If·a·node·is·started,·which·has·higher·priority·according |
390 | ······to·<span·class="code">distributed</span>,·than·the·node·where·a·distributed | 390 | ······to·<span·class="code">distributed</span>,·than·the·node·where·a·distributed |
391 | ······application·is·currently·running,·the·application·will·be | 391 | ······application·is·currently·running,·the·application·will·be |
392 | ······restarted·at·the·new·node·and·stopped·at·the·old·node.·This·is | 392 | ······restarted·at·the·new·node·and·stopped·at·the·old·node.·This·is |
393 | ······called·a·<strong>takeover</strong>.</p> | 393 | ······called·a·<strong>takeover</strong>.</p> |
Offset 47, 182 lines modified | Offset 47, 182 lines modified | ||
47 | <img·alt="Erlang·logo"·src="../erlang-logo.png"><br><small><a·href="users_guide.html">User's·Guide</a><br><a·href="../pdf/otp-system-documentation-6.3.pdf">PDF</a><br><a·href="../index.html">Top</a></small><p><strong>OTP·Design·Principles</strong><br><strong>User's·Guide</strong><br><small>Version·6.3</small></p> | 47 | <img·alt="Erlang·logo"·src="../erlang-logo.png"><br><small><a·href="users_guide.html">User's·Guide</a><br><a·href="../pdf/otp-system-documentation-6.3.pdf">PDF</a><br><a·href="../index.html">Top</a></small><p><strong>OTP·Design·Principles</strong><br><strong>User's·Guide</strong><br><small>Version·6.3</small></p> |
48 | <br><a·href="javascript:openAllFlips()">Expand·All</a><br><a·href="javascript:closeAllFlips()">Contract·All</a><p><small><strong>Chapters</strong></small></p> | 48 | <br><a·href="javascript:openAllFlips()">Expand·All</a><br><a·href="javascript:closeAllFlips()">Contract·All</a><p><small><strong>Chapters</strong></small></p> |
49 | <ul·class="flipMenu"·imagepath="../js/flipmenu"> | 49 | <ul·class="flipMenu"·imagepath="../js/flipmenu"> |
50 | <li·id="no"·title="Overview"·expanded="false">Overview<ul> | 50 | <li·id="no"·title="Overview"·expanded="false">Overview<ul> |
51 | <li><a·href="des_princ.html"> | 51 | <li><a·href="des_princ.html"> |
52 | ··············Top·of·chapter | 52 | ··············Top·of·chapter |
53 | ············</a></li> | 53 | ············</a></li> |
54 |
<li·title="Supervision·Trees"><a·href="des_princ.html#idm1 |
54 | <li·title="Supervision·Trees"><a·href="des_princ.html#idm140231008664592">Supervision·Trees</a></li> |
55 |
<li·title="Behaviours"><a·href="des_princ.html#idm1 |
55 | <li·title="Behaviours"><a·href="des_princ.html#idm140231008672688">Behaviours</a></li> |
56 |
<li·title="Applications"><a·href="des_princ.html#idm1 |
56 | <li·title="Applications"><a·href="des_princ.html#idm140231008752016">Applications</a></li> |
57 |
<li·title="Releases"><a·href="des_princ.html#idm1 |
57 | <li·title="Releases"><a·href="des_princ.html#idm140231008757072">Releases</a></li> |
58 |
<li·title="Release·Handling"><a·href="des_princ.html#idm1 |
58 | <li·title="Release·Handling"><a·href="des_princ.html#idm140231008760592">Release·Handling</a></li> |
59 | </ul> | 59 | </ul> |
60 | </li> | 60 | </li> |
61 | <li·id="no"·title="Gen_Server·Behaviour"·expanded="false">Gen_Server·Behaviour<ul> | 61 | <li·id="no"·title="Gen_Server·Behaviour"·expanded="false">Gen_Server·Behaviour<ul> |
62 | <li><a·href="gen_server_concepts.html"> | 62 | <li><a·href="gen_server_concepts.html"> |
63 | ··············Top·of·chapter | 63 | ··············Top·of·chapter |
64 | ············</a></li> | 64 | ············</a></li> |
65 |
<li·title="Client-Server·Principles"><a·href="gen_server_concepts.html#idm1 |
65 | <li·title="Client-Server·Principles"><a·href="gen_server_concepts.html#idm140231008770128">Client-Server·Principles</a></li> |
66 |
<li·title="Example"><a·href="gen_server_concepts.html#idm1 |
66 | <li·title="Example"><a·href="gen_server_concepts.html#idm140231008697632">Example</a></li> |
67 |
<li·title="Starting·a·Gen_Server"><a·href="gen_server_concepts.html#idm1 |
67 | <li·title="Starting·a·Gen_Server"><a·href="gen_server_concepts.html#idm140231008702000">Starting·a·Gen_Server</a></li> |
68 |
<li·title="Synchronous·Requests·-·Call"><a·href="gen_server_concepts.html#idm1 |
68 | <li·title="Synchronous·Requests·-·Call"><a·href="gen_server_concepts.html#idm140231008776224">Synchronous·Requests·-·Call</a></li> |
69 |
<li·title="Asynchronous·Requests·-·Cast"><a·href="gen_server_concepts.html#idm1 |
69 | <li·title="Asynchronous·Requests·-·Cast"><a·href="gen_server_concepts.html#idm140231008786432">Asynchronous·Requests·-·Cast</a></li> |
70 |
<li·title="Stopping"><a·href="gen_server_concepts.html#idm1 |
70 | <li·title="Stopping"><a·href="gen_server_concepts.html#idm140231009075376">Stopping</a></li> |
71 |
<li·title="Handling·Other·Messages"><a·href="gen_server_concepts.html#idm1 |
71 | <li·title="Handling·Other·Messages"><a·href="gen_server_concepts.html#idm140231008621744">Handling·Other·Messages</a></li> |
72 | </ul> | 72 | </ul> |
73 | </li> | 73 | </li> |
74 | <li·id="no"·title="Gen_Fsm·Behaviour"·expanded="false">Gen_Fsm·Behaviour<ul> | 74 | <li·id="no"·title="Gen_Fsm·Behaviour"·expanded="false">Gen_Fsm·Behaviour<ul> |
75 | <li><a·href="fsm.html"> | 75 | <li><a·href="fsm.html"> |
76 | ··············Top·of·chapter | 76 | ··············Top·of·chapter |
77 | ············</a></li> | 77 | ············</a></li> |
78 |
<li·title="Finite·State·Machines"><a·href="fsm.html#idm1 |
78 | <li·title="Finite·State·Machines"><a·href="fsm.html#idm140231009090752">Finite·State·Machines</a></li> |
79 |
<li·title="Example"><a·href="fsm.html#idm1 |
79 | <li·title="Example"><a·href="fsm.html#idm140231008799248">Example</a></li> |
80 |
<li·title="Starting·a·Gen_Fsm"><a·href="fsm.html#idm1 |
80 | <li·title="Starting·a·Gen_Fsm"><a·href="fsm.html#idm140231009551600">Starting·a·Gen_Fsm</a></li> |
81 |
<li·title="Notifying·About·Events"><a·href="fsm.html#idm1 |
81 | <li·title="Notifying·About·Events"><a·href="fsm.html#idm140231009115360">Notifying·About·Events</a></li> |
82 |
<li·title="Timeouts"><a·href="fsm.html#idm1 |
82 | <li·title="Timeouts"><a·href="fsm.html#idm140231009808544">Timeouts</a></li> |
83 |
<li·title="All·State·Events"><a·href="fsm.html#idm1 |
83 | <li·title="All·State·Events"><a·href="fsm.html#idm140231009303152">All·State·Events</a></li> |
84 |
<li·title="Stopping"><a·href="fsm.html#idm1 |
84 | <li·title="Stopping"><a·href="fsm.html#idm140231008912976">Stopping</a></li> |
85 |
<li·title="Handling·Other·Messages"><a·href="fsm.html#idm1 |
85 | <li·title="Handling·Other·Messages"><a·href="fsm.html#idm140231008432688">Handling·Other·Messages</a></li> |
86 | </ul> | 86 | </ul> |
87 | </li> | 87 | </li> |
88 | <li·id="loadscrollpos"·title="Gen_Event·Behaviour"·expanded="true">Gen_Event·Behaviour<ul> | 88 | <li·id="loadscrollpos"·title="Gen_Event·Behaviour"·expanded="true">Gen_Event·Behaviour<ul> |
89 | <li><a·href="events.html"> | 89 | <li><a·href="events.html"> |
90 | ··············Top·of·chapter | 90 | ··············Top·of·chapter |
91 | ············</a></li> | 91 | ············</a></li> |
92 |
<li·title="Event·Handling·Principles"><a·href="events.html#idm1 |
92 | <li·title="Event·Handling·Principles"><a·href="events.html#idm140231009179392">Event·Handling·Principles</a></li> |
93 |
<li·title="Example"><a·href="events.html#idm1 |
93 | <li·title="Example"><a·href="events.html#idm140231008417152">Example</a></li> |
94 |
<li·title="Starting·an·Event·Manager"><a·href="events.html#idm1 |
94 | <li·title="Starting·an·Event·Manager"><a·href="events.html#idm140231008413136">Starting·an·Event·Manager</a></li> |
95 |
<li·title="Adding·an·Event·Handler"><a·href="events.html#idm1 |
95 | <li·title="Adding·an·Event·Handler"><a·href="events.html#idm140231009388752">Adding·an·Event·Handler</a></li> |
96 |
<li·title="Notifying·About·Events"><a·href="events.html#idm1 |
96 | <li·title="Notifying·About·Events"><a·href="events.html#idm140231008728512">Notifying·About·Events</a></li> |
97 |
<li·title="Deleting·an·Event·Handler"><a·href="events.html#idm1 |
97 | <li·title="Deleting·an·Event·Handler"><a·href="events.html#idm140231008720736">Deleting·an·Event·Handler</a></li> |
98 |
<li·title="Stopping"><a·href="events.html#idm1 |
98 | <li·title="Stopping"><a·href="events.html#idm140231008689408">Stopping</a></li> |
99 |
<li·title="Handling·Other·Messages"><a·href="events.html#idm1 |
99 | <li·title="Handling·Other·Messages"><a·href="events.html#idm140231008683248">Handling·Other·Messages</a></li> |
100 | </ul> | 100 | </ul> |
101 | </li> | 101 | </li> |
102 | <li·id="no"·title="Supervisor·Behaviour"·expanded="false">Supervisor·Behaviour<ul> | 102 | <li·id="no"·title="Supervisor·Behaviour"·expanded="false">Supervisor·Behaviour<ul> |
103 | <li><a·href="sup_princ.html"> | 103 | <li><a·href="sup_princ.html"> |
104 | ··············Top·of·chapter | 104 | ··············Top·of·chapter |
105 | ············</a></li> | 105 | ············</a></li> |
106 |
<li·title="Supervision·Principles"><a·href="sup_princ.html#idm1 |
106 | <li·title="Supervision·Principles"><a·href="sup_princ.html#idm140231008291744">Supervision·Principles</a></li> |
107 |
<li·title="Example"><a·href="sup_princ.html#idm1 |
107 | <li·title="Example"><a·href="sup_princ.html#idm140231009682528">Example</a></li> |
108 |
<li·title="Restart·Strategy"><a·href="sup_princ.html#idm1 |
108 | <li·title="Restart·Strategy"><a·href="sup_princ.html#idm140231009629632">Restart·Strategy</a></li> |
109 |
<li·title="Maximum·Restart·Frequency"><a·href="sup_princ.html#idm1 |
109 | <li·title="Maximum·Restart·Frequency"><a·href="sup_princ.html#idm140231008896368">Maximum·Restart·Frequency</a></li> |
110 |
<li·title="Child·Specification"><a·href="sup_princ.html#idm1 |
110 | <li·title="Child·Specification"><a·href="sup_princ.html#idm140231008285744">Child·Specification</a></li> |
111 |
<li·title="Starting·a·Supervisor"><a·href="sup_princ.html#idm1 |
111 | <li·title="Starting·a·Supervisor"><a·href="sup_princ.html#idm140231008253328">Starting·a·Supervisor</a></li> |
112 |
<li·title="Adding·a·Child·Process"><a·href="sup_princ.html#idm1 |
112 | <li·title="Adding·a·Child·Process"><a·href="sup_princ.html#idm140231008242208">Adding·a·Child·Process</a></li> |
113 |
<li·title="Stopping·a·Child·Process"><a·href="sup_princ.html#idm1 |
113 | <li·title="Stopping·a·Child·Process"><a·href="sup_princ.html#idm140231008237824">Stopping·a·Child·Process</a></li> |
114 |
<li·title="Simple-One-For-One·Supervisors"><a·href="sup_princ.html#idm1 |
114 | <li·title="Simple-One-For-One·Supervisors"><a·href="sup_princ.html#idm140231008233024">Simple-One-For-One·Supervisors</a></li> |
115 |
<li·title="Stopping"><a·href="sup_princ.html#idm1 |
115 | <li·title="Stopping"><a·href="sup_princ.html#idm140231008218080">Stopping</a></li> |
116 | </ul> | 116 | </ul> |
117 | </li> | 117 | </li> |
118 | <li·id="no"·title="Sys·and·Proc_Lib"·expanded="false">Sys·and·Proc_Lib<ul> | 118 | <li·id="no"·title="Sys·and·Proc_Lib"·expanded="false">Sys·and·Proc_Lib<ul> |
119 | <li><a·href="spec_proc.html"> | 119 | <li><a·href="spec_proc.html"> |
120 | ··············Top·of·chapter | 120 | ··············Top·of·chapter |
121 | ············</a></li> | 121 | ············</a></li> |
122 |
<li·title="Simple·Debugging"><a·href="spec_proc.html#idm1 |
122 | <li·title="Simple·Debugging"><a·href="spec_proc.html#idm140231008206384">Simple·Debugging</a></li> |
123 |
<li·title="Special·Processes"><a·href="spec_proc.html#idm1 |
123 | <li·title="Special·Processes"><a·href="spec_proc.html#idm140231008196256">Special·Processes</a></li> |
124 |
<li·title="User-Defined·Behaviours"><a·href="spec_proc.html#idm1 |
124 | <li·title="User-Defined·Behaviours"><a·href="spec_proc.html#idm140231008119008">User-Defined·Behaviours</a></li> |
125 | </ul> | 125 | </ul> |
126 | </li> | 126 | </li> |
127 | <li·id="no"·title="Applications"·expanded="false">Applications<ul> | 127 | <li·id="no"·title="Applications"·expanded="false">Applications<ul> |
128 | <li><a·href="applications.html"> | 128 | <li><a·href="applications.html"> |
129 | ··············Top·of·chapter | 129 | ··············Top·of·chapter |
130 | ············</a></li> | 130 | ············</a></li> |
131 |
<li·title="Application·Concept"><a·href="applications.html#idm1 |
131 | <li·title="Application·Concept"><a·href="applications.html#idm140231008095264">Application·Concept</a></li> |
132 |
<li·title="Application·Callback·Module"><a·href="applications.html#idm1 |
132 | <li·title="Application·Callback·Module"><a·href="applications.html#idm140231008087216">Application·Callback·Module</a></li> |
133 |
<li·title="Application·Resource·File"><a·href="applications.html#idm1 |
133 | <li·title="Application·Resource·File"><a·href="applications.html#idm140231008073536">Application·Resource·File</a></li> |
134 |
<li·title="Directory·Structure"><a·href="applications.html#idm1 |
134 | <li·title="Directory·Structure"><a·href="applications.html#idm140231008043200">Directory·Structure</a></li> |
135 |
<li·title="Application·Controller"><a·href="applications.html#idm1 |
135 | <li·title="Application·Controller"><a·href="applications.html#idm140231008028064">Application·Controller</a></li> |
136 |
<li·title="Loading·and·Unloading·Applications"><a·href="applications.html#idm1 |
136 | <li·title="Loading·and·Unloading·Applications"><a·href="applications.html#idm140231008024128">Loading·and·Unloading·Applications</a></li> |
137 |
<li·title="Starting·and·Stopping·Applications"><a·href="applications.html#idm1 |
137 | <li·title="Starting·and·Stopping·Applications"><a·href="applications.html#idm140231008016672">Starting·and·Stopping·Applications</a></li> |
138 |
<li·title="Configuring·an·Application"><a·href="applications.html#idm1 |
138 | <li·title="Configuring·an·Application"><a·href="applications.html#idm140231008006160">Configuring·an·Application</a></li> |
139 |
<li·title="Application·Start·Types"><a·href="applications.html#idm1 |
139 | <li·title="Application·Start·Types"><a·href="applications.html#idm140231007982224">Application·Start·Types</a></li> |
140 | </ul> | 140 | </ul> |
141 | </li> | 141 | </li> |
142 | <li·id="no"·title="Included·Applications"·expanded="false">Included·Applications<ul> | 142 | <li·id="no"·title="Included·Applications"·expanded="false">Included·Applications<ul> |
143 | <li><a·href="included_applications.html"> | 143 | <li><a·href="included_applications.html"> |
144 | ··············Top·of·chapter | 144 | ··············Top·of·chapter |
145 | ············</a></li> | 145 | ············</a></li> |
146 |
<li·title="Definition"><a·href="included_applications.html#idm1 |
146 | <li·title="Definition"><a·href="included_applications.html#idm140231007965456">Definition</a></li> |
147 |
<li·title="Specifying·Included·Applications"><a·href="included_applications.html#idm1 |
147 | <li·title="Specifying·Included·Applications"><a·href="included_applications.html#idm140231007957600">Specifying·Included·Applications</a></li> |
148 |
<li·title="Synchronizing·Processes·During·Startup"><a·href="included_applications.html#idm1 |
148 | <li·title="Synchronizing·Processes·During·Startup"><a·href="included_applications.html#idm140231007954560">Synchronizing·Processes·During·Startup</a></li> |
149 | </ul> | 149 | </ul> |
150 | </li> | 150 | </li> |
151 | <li·id="no"·title="Distributed·Applications"·expanded="false">Distributed·Applications<ul> | 151 | <li·id="no"·title="Distributed·Applications"·expanded="false">Distributed·Applications<ul> |
152 | <li><a·href="distributed_applications.html"> | 152 | <li><a·href="distributed_applications.html"> |
153 | ··············Top·of·chapter | 153 | ··············Top·of·chapter |
154 | ············</a></li> | 154 | ············</a></li> |
155 |
<li·title="Definition"><a·href="distributed_applications.html#idm1 |
155 | <li·title="Definition"><a·href="distributed_applications.html#idm140231007928960">Definition</a></li> |
156 |
<li·title="Specifying·Distributed·Applications"><a·href="distributed_applications.html#idm1 |
156 | <li·title="Specifying·Distributed·Applications"><a·href="distributed_applications.html#idm140231007924640">Specifying·Distributed·Applications</a></li> |
157 |
<li·title="Starting·and·Stopping·Distributed·Applications"><a·href="distributed_applications.html#idm1 |
157 | <li·title="Starting·and·Stopping·Distributed·Applications"><a·href="distributed_applications.html#idm140231007899872">Starting·and·Stopping·Distributed·Applications</a></li> |
158 |
<li·title="Failover"><a·href="distributed_applications.html#idm1 |
158 | <li·title="Failover"><a·href="distributed_applications.html#idm140231007887632">Failover</a></li> |
159 |
<li·title="Takeover"><a·href="distributed_applications.html#idm1 |
159 | <li·title="Takeover"><a·href="distributed_applications.html#idm140231007870560">Takeover</a></li> |
160 | </ul> | 160 | </ul> |
161 | </li> | 161 | </li> |
162 | <li·id="no"·title="Releases"·expanded="false">Releases<ul> | 162 | <li·id="no"·title="Releases"·expanded="false">Releases<ul> |
163 | <li><a·href="release_structure.html"> | 163 | <li><a·href="release_structure.html"> |
164 | ··············Top·of·chapter | 164 | ··············Top·of·chapter |
165 | ············</a></li> | 165 | ············</a></li> |
166 |
<li·title="Release·Concept"><a·href="release_structure.html#idm1 |
166 | <li·title="Release·Concept"><a·href="release_structure.html#idm140231007847120">Release·Concept</a></li> |
167 |
<li·title="Release·Resource·File"><a·href="release_structure.html#idm1 |
167 | <li·title="Release·Resource·File"><a·href="release_structure.html#idm140231007840816">Release·Resource·File</a></li> |
168 |
<li·title="Generating·Boot·Scripts"><a·href="release_structure.html#idm1 |
168 | <li·title="Generating·Boot·Scripts"><a·href="release_structure.html#idm140231007823104">Generating·Boot·Scripts</a></li> |
169 |
<li·title="Creating·a·Release·Package"><a·href="release_structure.html#idm1 |
169 | <li·title="Creating·a·Release·Package"><a·href="release_structure.html#idm140231007811840">Creating·a·Release·Package</a></li> |
170 |
<li·title="Directory·Structure"><a·href="release_structure.html#idm1 |
170 | <li·title="Directory·Structure"><a·href="release_structure.html#idm140231007794016">Directory·Structure</a></li> |
171 | </ul> | 171 | </ul> |
172 | </li> | 172 | </li> |
173 | <li·id="no"·title="Release·Handling"·expanded="false">Release·Handling<ul> | 173 | <li·id="no"·title="Release·Handling"·expanded="false">Release·Handling<ul> |
174 | <li><a·href="release_handling.html"> | 174 | <li><a·href="release_handling.html"> |
175 | ··············Top·of·chapter | 175 | ··············Top·of·chapter |
176 | ············</a></li> | 176 | ············</a></li> |
177 |
<li·title="Release·Handling·Principles"><a·href="release_handling.html#idm1 |
177 | <li·title="Release·Handling·Principles"><a·href="release_handling.html#idm140231007763648">Release·Handling·Principles</a></li> |
178 |
<li·title="Requirements"><a·href="release_handling.html#idm1 |
178 | <li·title="Requirements"><a·href="release_handling.html#idm140231007734288">Requirements</a></li> |
179 |
<li·title="Distributed·Systems"><a·href="release_handling.html#idm1 |
179 | <li·title="Distributed·Systems"><a·href="release_handling.html#idm140231007723152">Distributed·Systems</a></li> |
180 |
<li·title="Release·Handling·Instructions"><a·href="release_handling.html#idm1 |
180 | <li·title="Release·Handling·Instructions"><a·href="release_handling.html#idm140231007719984">Release·Handling·Instructions</a></li> |
181 |
<li·title="Application·Upgrade·File"><a·href="release_handling.html#idm1 |
181 | <li·title="Application·Upgrade·File"><a·href="release_handling.html#idm140231007656768">Application·Upgrade·File</a></li> |
182 |
<li·title="Release·Upgrade·File"><a·href="release_handling.html#idm1 |
182 | <li·title="Release·Upgrade·File"><a·href="release_handling.html#idm140231007634928">Release·Upgrade·File</a></li> |
183 |
<li·title="Installing·a·Release"><a·href="release_handling.html#idm1 |
183 | <li·title="Installing·a·Release"><a·href="release_handling.html#idm140231007616192">Installing·a·Release</a></li> |
184 |
<li·title="Updating·Application·Specifications"><a·href="release_handling.html#idm1 |
184 | <li·title="Updating·Application·Specifications"><a·href="release_handling.html#idm140231007559712">Updating·Application·Specifications</a></li> |
185 | </ul> | 185 | </ul> |
186 | </li> | 186 | </li> |
187 | <li·id="no"·title="Appup·Cookbook"·expanded="false">Appup·Cookbook<ul> | 187 | <li·id="no"·title="Appup·Cookbook"·expanded="false">Appup·Cookbook<ul> |
188 | <li><a·href="appup_cookbook.html"> | 188 | <li><a·href="appup_cookbook.html"> |
189 | ··············Top·of·chapter | 189 | ··············Top·of·chapter |
190 | ············</a></li> | 190 | ············</a></li> |
191 |
<li·title="Changing·a·Functional·Module"><a·href="appup_cookbook.html#idm1 |
191 | <li·title="Changing·a·Functional·Module"><a·href="appup_cookbook.html#idm140231007537632">Changing·a·Functional·Module</a></li> |
192 |
<li·title="Changing·a·Residence·Module"><a·href="appup_cookbook.html#idm1 |
192 | <li·title="Changing·a·Residence·Module"><a·href="appup_cookbook.html#idm140231007534896">Changing·a·Residence·Module</a></li> |
193 |
<li·title="Changing·a·Callback·Module"><a·href="appup_cookbook.html#idm1 |
193 | <li·title="Changing·a·Callback·Module"><a·href="appup_cookbook.html#idm140231007530240">Changing·a·Callback·Module</a></li> |
194 |
<li·title="Changing·Internal·State"><a·href="appup_cookbook.html#idm1 |
194 | <li·title="Changing·Internal·State"><a·href="appup_cookbook.html#idm140231007524112">Changing·Internal·State</a></li> |
195 |
<li·title="Module·Dependencies"><a·href="appup_cookbook.html#idm1 |
195 | <li·title="Module·Dependencies"><a·href="appup_cookbook.html#idm140231007507968">Module·Dependencies</a></li> |
196 |
<li·title="Changing·Code·For·a·Special·Process"><a·href="appup_cookbook.html#idm1 |
196 | <li·title="Changing·Code·For·a·Special·Process"><a·href="appup_cookbook.html#idm140231007487488">Changing·Code·For·a·Special·Process</a></li> |
197 |
<li·title="Changing·a·Supervisor"><a·href="appup_cookbook.html#idm1 |
197 | <li·title="Changing·a·Supervisor"><a·href="appup_cookbook.html#idm140231007467472">Changing·a·Supervisor</a></li> |
198 |
<li·title="Adding·or·Deleting·a·Module"><a·href="appup_cookbook.html#idm1 |
198 | <li·title="Adding·or·Deleting·a·Module"><a·href="appup_cookbook.html#idm140231007437968">Adding·or·Deleting·a·Module</a></li> |
199 |
<li·title="Starting·or·Terminating·a·Process"><a·href="appup_cookbook.html#idm1 |
199 | <li·title="Starting·or·Terminating·a·Process"><a·href="appup_cookbook.html#idm140231007434928">Starting·or·Terminating·a·Process</a></li> |
200 |
<li·title="Adding·or·Removing·an·Application"><a·href="appup_cookbook.html#idm1 |
200 | <li·title="Adding·or·Removing·an·Application"><a·href="appup_cookbook.html#idm140231007432704">Adding·or·Removing·an·Application</a></li> |
201 |
<li·title="Restarting·an·Application"><a·href="appup_cookbook.html#idm1 |
201 | <li·title="Restarting·an·Application"><a·href="appup_cookbook.html#idm140231007429024">Restarting·an·Application</a></li> |
202 |
<li·title="Changing·an·Application·Specification"><a·href="appup_cookbook.html#idm1 |
202 | <li·title="Changing·an·Application·Specification"><a·href="appup_cookbook.html#idm140231007423968">Changing·an·Application·Specification</a></li> |
203 |
<li·title="Changing·Application·Configuration"><a·href="appup_cookbook.html#idm1 |
203 | <li·title="Changing·Application·Configuration"><a·href="appup_cookbook.html#idm140231007421104">Changing·Application·Configuration</a></li> |
204 |
<li·title="Changing·Included·Applications"><a·href="appup_cookbook.html#idm1 |
204 | <li·title="Changing·Included·Applications"><a·href="appup_cookbook.html#idm140231007417088">Changing·Included·Applications</a></li> |
205 |
<li·title="Changing·Non-Erlang·Code"><a·href="appup_cookbook.html#idm1 |
205 | <li·title="Changing·Non-Erlang·Code"><a·href="appup_cookbook.html#idm140231007388304">Changing·Non-Erlang·Code</a></li> |
206 |
<li·title="Emulator·Restart·and·Upgrade"><a·href="appup_cookbook.html#idm1 |
206 | <li·title="Emulator·Restart·and·Upgrade"><a·href="appup_cookbook.html#idm140231007378160">Emulator·Restart·and·Upgrade</a></li> |
207 |
<li·title="Emulator·Upgrade·from·pre·OTP·R15"><a·href="appup_cookbook.html#idm1 |
207 | <li·title="Emulator·Upgrade·from·pre·OTP·R15"><a·href="appup_cookbook.html#idm140231007368976">Emulator·Upgrade·from·pre·OTP·R15</a></li> |
208 | </ul> | 208 | </ul> |
209 | </li> | 209 | </li> |
210 | </ul> | 210 | </ul> |
211 | </div></div> | 211 | </div></div> |
212 | <div·id="content"> | 212 | <div·id="content"> |
213 | <div·class="innertube"> | 213 | <div·class="innertube"> |
214 | <h1>4 Gen_Event·Behaviour</h1> | 214 | <h1>4 Gen_Event·Behaviour</h1> |
215 | ·· | 215 | ·· |
216 | ··<a·name="gen_event"></a> | 216 | ··<a·name="gen_event"></a> |
217 | ··<p>This·chapter·should·be·read·in·conjunction·with | 217 | ··<p>This·chapter·should·be·read·in·conjunction·with |
218 | ····<span·class="code">gen_event(3)</span>,·where·all·interface·functions·and·callback | 218 | ····<span·class="code">gen_event(3)</span>,·where·all·interface·functions·and·callback |
219 | ····functions·are·described·in·detail.</p> | 219 | ····functions·are·described·in·detail.</p> |
220 |
··<h3><a·name="idm1 |
220 | ··<h3><a·name="idm140231009179392">4.1 |
221 | ········Event·Handling·Principles</a></h3> | 221 | ········Event·Handling·Principles</a></h3> |
222 | ···· | 222 | ···· |
223 | ····<p>In·OTP,·an·<strong>event·manager</strong>·is·a·named·object·to·which | 223 | ····<p>In·OTP,·an·<strong>event·manager</strong>·is·a·named·object·to·which |
224 | ······events·can·be·sent.·An·<strong>event</strong>·could·be,·for·example, | 224 | ······events·can·be·sent.·An·<strong>event</strong>·could·be,·for·example, |
225 | ······an·error,·an·alarm·or·some·information·that·should·be·logged.</p> | 225 | ······an·error,·an·alarm·or·some·information·that·should·be·logged.</p> |
226 | ····<p>In·the·event·manager,·zero,·one·or·several·<strong>event·handlers</strong>·are·installed.·When·the·event·manager·is·notified | 226 | ····<p>In·the·event·manager,·zero,·one·or·several·<strong>event·handlers</strong>·are·installed.·When·the·event·manager·is·notified |
227 | ······about·an·event,·the·event·will·be·processed·by·all·the·installed | 227 | ······about·an·event,·the·event·will·be·processed·by·all·the·installed |
Offset 236, 15 lines modified | Offset 236, 15 lines modified | ||
236 | ······handler·is·implemented·as·a·callback·module.</p> | 236 | ······handler·is·implemented·as·a·callback·module.</p> |
237 | ····<p>The·event·manager·essentially·maintains·a·list·of | 237 | ····<p>The·event·manager·essentially·maintains·a·list·of |
238 | ······<span·class="code">{Module,·State}</span>·pairs,·where·each·<span·class="code">Module</span>·is·an | 238 | ······<span·class="code">{Module,·State}</span>·pairs,·where·each·<span·class="code">Module</span>·is·an |
239 | ······event·handler,·and·<span·class="code">State</span>·the·internal·state·of·that·event | 239 | ······event·handler,·and·<span·class="code">State</span>·the·internal·state·of·that·event |
240 | ······handler.</p> | 240 | ······handler.</p> |
241 | ·· | 241 | ·· |
242 |
··<h3><a·name="idm1 |
242 | ··<h3><a·name="idm140231008417152">4.2 |
243 | ········Example</a></h3> | 243 | ········Example</a></h3> |
244 | ···· | 244 | ···· |
245 | ····<p>The·callback·module·for·the·event·handler·writing·error·messages | 245 | ····<p>The·callback·module·for·the·event·handler·writing·error·messages |
246 | ······to·the·terminal·could·look·like:</p> | 246 | ······to·the·terminal·could·look·like:</p> |
247 | ····<div·class="example"><pre> | 247 | ····<div·class="example"><pre> |
248 | -module(terminal_logger). | 248 | -module(terminal_logger). |
249 | -behaviour(gen_event). | 249 | -behaviour(gen_event). |
Offset 277, 15 lines modified | Offset 277, 15 lines modified | ||
277 | ····{ok,·Fd}. | 277 | ····{ok,·Fd}. |
278 | terminate(_Args,·Fd)·-> | 278 | terminate(_Args,·Fd)·-> |
279 | ····file:close(Fd).</pre></div> | 279 | ····file:close(Fd).</pre></div> |
280 | ····<p>The·code·is·explained·in·the·next·sections.</p> | 280 | ····<p>The·code·is·explained·in·the·next·sections.</p> |
281 | ·· | 281 | ·· |
282 |
··<h3><a·name="idm1 |
282 | ··<h3><a·name="idm140231008413136">4.3 |
283 | ········Starting·an·Event·Manager</a></h3> | 283 | ········Starting·an·Event·Manager</a></h3> |
284 | ····<a·name="mgr"></a> | 284 | ····<a·name="mgr"></a> |
285 | ···· | 285 | ···· |
286 | ····<p>To·start·an·event·manager·for·handling·errors,·as·described·in | 286 | ····<p>To·start·an·event·manager·for·handling·errors,·as·described·in |
287 | ······the·example·above,·call·the·following·function:</p> | 287 | ······the·example·above,·call·the·following·function:</p> |
288 | ····<div·class="example"><pre> | 288 | ····<div·class="example"><pre> |
289 | gen_event:start_link({local,·error_man})</pre></div> | 289 | gen_event:start_link({local,·error_man})</pre></div> |
Offset 301, 15 lines modified | Offset 301, 15 lines modified | ||
301 | ····<p><span·class="code">gen_event:start_link</span>·must·be·used·if·the·event·manager·is | 301 | ····<p><span·class="code">gen_event:start_link</span>·must·be·used·if·the·event·manager·is |
302 | ······part·of·a·supervision·tree,·i.e.·is·started·by·a·supervisor. | 302 | ······part·of·a·supervision·tree,·i.e.·is·started·by·a·supervisor. |
303 | ······There·is·another·function·<span·class="code">gen_event:start</span>·to·start·a | 303 | ······There·is·another·function·<span·class="code">gen_event:start</span>·to·start·a |
304 | ······stand-alone·event·manager,·i.e.·an·event·manager·which·is·not | 304 | ······stand-alone·event·manager,·i.e.·an·event·manager·which·is·not |
305 | ······part·of·a·supervision·tree.</p> | 305 | ······part·of·a·supervision·tree.</p> |
306 | ·· | 306 | ·· |
307 |
··<h3><a·name="idm1 |
307 | ··<h3><a·name="idm140231009388752">4.4 |
308 | ········Adding·an·Event·Handler</a></h3> | 308 | ········Adding·an·Event·Handler</a></h3> |
309 | ···· | 309 | ···· |
310 | ····<p>Here·is·an·example·using·the·shell·on·how·to·start·an·event | 310 | ····<p>Here·is·an·example·using·the·shell·on·how·to·start·an·event |
311 | ······manager·and·add·an·event·handler·to·it:</p> | 311 | ······manager·and·add·an·event·handler·to·it:</p> |
312 | ····<div·class="example"><pre> | 312 | ····<div·class="example"><pre> |
313 | 1>·<span·class="bold_code">gen_event:start({local,·error_man}).</span> | 313 | 1>·<span·class="bold_code">gen_event:start({local,·error_man}).</span> |
314 | {ok,<0.31.0>} | 314 | {ok,<0.31.0>} |
Offset 331, 15 lines modified | Offset 331, 15 lines modified | ||
331 | ······to·save·the·open·file·descriptor.</p> | 331 | ······to·save·the·open·file·descriptor.</p> |
332 | ····<div·class="example"><pre> | 332 | ····<div·class="example"><pre> |
333 | init(File)·-> | 333 | init(File)·-> |
334 | ····{ok,·Fd}·=·file:open(File,·read), | 334 | ····{ok,·Fd}·=·file:open(File,·read), |
335 | ····{ok,·Fd}.</pre></div> | 335 | ····{ok,·Fd}.</pre></div> |
336 | ·· | 336 | ·· |
337 |
··<h3><a·name="idm1 |
337 | ··<h3><a·name="idm140231008728512">4.5 |
338 | ········Notifying·About·Events</a></h3> | 338 | ········Notifying·About·Events</a></h3> |
339 | ···· | 339 | ···· |
340 | ····<div·class="example"><pre> | 340 | ····<div·class="example"><pre> |
341 | 3>·<span·class="bold_code">gen_event:notify(error_man,·no_reply).</span> | 341 | 3>·<span·class="bold_code">gen_event:notify(error_man,·no_reply).</span> |
342 | ***Error***·no_reply | 342 | ***Error***·no_reply |
343 | ok</pre></div> | 343 | ok</pre></div> |
344 | ····<p><span·class="code">error_man</span>·is·the·name·of·the·event·manager·and | 344 | ····<p><span·class="code">error_man</span>·is·the·name·of·the·event·manager·and |
Offset 358, 15 lines modified | Offset 358, 15 lines modified | ||
358 | ····<p>In·<span·class="code">file_logger</span>:</p> | 358 | ····<p>In·<span·class="code">file_logger</span>:</p> |
359 | ····<div·class="example"><pre> | 359 | ····<div·class="example"><pre> |
360 | handle_event(ErrorMsg,·Fd)·-> | 360 | handle_event(ErrorMsg,·Fd)·-> |
361 | ····io:format(Fd,·"***Error***·~p~n",·[ErrorMsg]), | 361 | ····io:format(Fd,·"***Error***·~p~n",·[ErrorMsg]), |
362 | ····{ok,·Fd}.</pre></div> | 362 | ····{ok,·Fd}.</pre></div> |
363 | ·· | 363 | ·· |
364 |
··<h3><a·name="idm1 |
364 | ··<h3><a·name="idm140231008720736">4.6 |
365 | ········Deleting·an·Event·Handler</a></h3> | 365 | ········Deleting·an·Event·Handler</a></h3> |
366 | ···· | 366 | ···· |
367 | ····<div·class="example"><pre> | 367 | ····<div·class="example"><pre> |
368 | 4>·<span·class="bold_code">gen_event:delete_handler(error_man,·terminal_logger,·[]).</span> | 368 | 4>·<span·class="bold_code">gen_event:delete_handler(error_man,·terminal_logger,·[]).</span> |
369 | ok</pre></div> | 369 | ok</pre></div> |
370 | ····<p>This·function·sends·a·message·to·the·event·manager·registered·as | 370 | ····<p>This·function·sends·a·message·to·the·event·manager·registered·as |
371 | ······<span·class="code">error_man</span>,·telling·it·to·delete·the·event·handler | 371 | ······<span·class="code">error_man</span>,·telling·it·to·delete·the·event·handler |
Offset 382, 15 lines modified | Offset 382, 15 lines modified | ||
382 | ····<p>For·<span·class="code">file_logger</span>,·the·file·descriptor·opened·in·<span·class="code">init</span> | 382 | ····<p>For·<span·class="code">file_logger</span>,·the·file·descriptor·opened·in·<span·class="code">init</span> |
383 | ······needs·to·be·closed:</p> | 383 | ······needs·to·be·closed:</p> |
384 | ····<div·class="example"><pre> | 384 | ····<div·class="example"><pre> |
385 | terminate(_Args,·Fd)·-> | 385 | terminate(_Args,·Fd)·-> |
386 | ····file:close(Fd).</pre></div> | 386 | ····file:close(Fd).</pre></div> |
387 | ·· | 387 | ·· |
388 |
··<h3><a·name="idm1 |
388 | ··<h3><a·name="idm140231008689408">4.7 |
389 | ········Stopping</a></h3> | 389 | ········Stopping</a></h3> |
390 | ···· | 390 | ···· |
391 | ····<p>When·an·event·manager·is·stopped,·it·will·give·each·of | 391 | ····<p>When·an·event·manager·is·stopped,·it·will·give·each·of |
392 | ······the·installed·event·handlers·the·chance·to·clean·up·by·calling | 392 | ······the·installed·event·handlers·the·chance·to·clean·up·by·calling |
393 | ······<span·class="code">terminate/2</span>,·the·same·way·as·when·deleting·a·handler.</p> | 393 | ······<span·class="code">terminate/2</span>,·the·same·way·as·when·deleting·a·handler.</p> |
394 | ····<h4>In·a·Supervision·Tree</h4> | 394 | ····<h4>In·a·Supervision·Tree</h4> |
Offset 405, 15 lines modified | Offset 405, 15 lines modified | ||
405 | ······ | 405 | ······ |
406 | ······<p>An·event·manager·can·also·be·stopped·by·calling:</p> | 406 | ······<p>An·event·manager·can·also·be·stopped·by·calling:</p> |
407 | ······<div·class="example"><pre> | 407 | ······<div·class="example"><pre> |
408 | >·<span·class="bold_code">gen_event:stop(error_man).</span> | 408 | >·<span·class="bold_code">gen_event:stop(error_man).</span> |
409 | ok</pre></div> | 409 | ok</pre></div> |
410 | ···· | 410 | ···· |
411 | ·· | 411 | ·· |
412 |
··<h3><a·name="idm1 |
412 | ··<h3><a·name="idm140231008683248">4.8 |
413 | ········Handling·Other·Messages</a></h3> | 413 | ········Handling·Other·Messages</a></h3> |
414 | ···· | 414 | ···· |
415 | ····<p>If·the·gen_event·should·be·able·to·receive·other·messages·than | 415 | ····<p>If·the·gen_event·should·be·able·to·receive·other·messages·than |
416 | ······events,·the·callback·function·<span·class="code">handle_info(Info,·StateName,·StateData)</span> | 416 | ······events,·the·callback·function·<span·class="code">handle_info(Info,·StateName,·StateData)</span> |
417 | ······must·be·implemented·to·handle·them.·Examples·of | 417 | ······must·be·implemented·to·handle·them.·Examples·of |
418 | ······other·messages·are·exit·messages,·if·the·gen_event·is·linked·to | 418 | ······other·messages·are·exit·messages,·if·the·gen_event·is·linked·to |
419 | ······other·processes·(than·the·supervisor)·and·trapping·exit·signals.</p> | 419 | ······other·processes·(than·the·supervisor)·and·trapping·exit·signals.</p> |
Offset 47, 181 lines modified | Offset 47, 181 lines modified | ||
47 | <img·alt="Erlang·logo"·src="../erlang-logo.png"><br><small><a·href="users_guide.html">User's·Guide</a><br><a·href="../pdf/otp-system-documentation-6.3.pdf">PDF</a><br><a·href="../index.html">Top</a></small><p><strong>OTP·Design·Principles</strong><br><strong>User's·Guide</strong><br><small>Version·6.3</small></p> | 47 | <img·alt="Erlang·logo"·src="../erlang-logo.png"><br><small><a·href="users_guide.html">User's·Guide</a><br><a·href="../pdf/otp-system-documentation-6.3.pdf">PDF</a><br><a·href="../index.html">Top</a></small><p><strong>OTP·Design·Principles</strong><br><strong>User's·Guide</strong><br><small>Version·6.3</small></p> |
48 | <br><a·href="javascript:openAllFlips()">Expand·All</a><br><a·href="javascript:closeAllFlips()">Contract·All</a><p><small><strong>Chapters</strong></small></p> | 48 | <br><a·href="javascript:openAllFlips()">Expand·All</a><br><a·href="javascript:closeAllFlips()">Contract·All</a><p><small><strong>Chapters</strong></small></p> |
49 | <ul·class="flipMenu"·imagepath="../js/flipmenu"> | 49 | <ul·class="flipMenu"·imagepath="../js/flipmenu"> |
50 | <li·id="no"·title="Overview"·expanded="false">Overview<ul> | 50 | <li·id="no"·title="Overview"·expanded="false">Overview<ul> |
51 | <li><a·href="des_princ.html"> | 51 | <li><a·href="des_princ.html"> |
52 | ··············Top·of·chapter | 52 | ··············Top·of·chapter |
53 | ············</a></li> | 53 | ············</a></li> |
54 |
<li·title="Supervision·Trees"><a·href="des_princ.html#idm1 |
54 | <li·title="Supervision·Trees"><a·href="des_princ.html#idm140231008664592">Supervision·Trees</a></li> |
55 |
<li·title="Behaviours"><a·href="des_princ.html#idm1 |
55 | <li·title="Behaviours"><a·href="des_princ.html#idm140231008672688">Behaviours</a></li> |
56 |
<li·title="Applications"><a·href="des_princ.html#idm1 |
56 | <li·title="Applications"><a·href="des_princ.html#idm140231008752016">Applications</a></li> |
57 |
<li·title="Releases"><a·href="des_princ.html#idm1 |
57 | <li·title="Releases"><a·href="des_princ.html#idm140231008757072">Releases</a></li> |
58 |
<li·title="Release·Handling"><a·href="des_princ.html#idm1 |
58 | <li·title="Release·Handling"><a·href="des_princ.html#idm140231008760592">Release·Handling</a></li> |
59 | </ul> | 59 | </ul> |
60 | </li> | 60 | </li> |
61 | <li·id="no"·title="Gen_Server·Behaviour"·expanded="false">Gen_Server·Behaviour<ul> | 61 | <li·id="no"·title="Gen_Server·Behaviour"·expanded="false">Gen_Server·Behaviour<ul> |
62 | <li><a·href="gen_server_concepts.html"> | 62 | <li><a·href="gen_server_concepts.html"> |
63 | ··············Top·of·chapter | 63 | ··············Top·of·chapter |
64 | ············</a></li> | 64 | ············</a></li> |
65 |
<li·title="Client-Server·Principles"><a·href="gen_server_concepts.html#idm1 |
65 | <li·title="Client-Server·Principles"><a·href="gen_server_concepts.html#idm140231008770128">Client-Server·Principles</a></li> |
66 |
<li·title="Example"><a·href="gen_server_concepts.html#idm1 |
66 | <li·title="Example"><a·href="gen_server_concepts.html#idm140231008697632">Example</a></li> |
67 |
<li·title="Starting·a·Gen_Server"><a·href="gen_server_concepts.html#idm1 |
67 | <li·title="Starting·a·Gen_Server"><a·href="gen_server_concepts.html#idm140231008702000">Starting·a·Gen_Server</a></li> |
68 |
<li·title="Synchronous·Requests·-·Call"><a·href="gen_server_concepts.html#idm1 |
68 | <li·title="Synchronous·Requests·-·Call"><a·href="gen_server_concepts.html#idm140231008776224">Synchronous·Requests·-·Call</a></li> |
69 |
<li·title="Asynchronous·Requests·-·Cast"><a·href="gen_server_concepts.html#idm1 |
69 | <li·title="Asynchronous·Requests·-·Cast"><a·href="gen_server_concepts.html#idm140231008786432">Asynchronous·Requests·-·Cast</a></li> |
70 |
<li·title="Stopping"><a·href="gen_server_concepts.html#idm1 |
70 | <li·title="Stopping"><a·href="gen_server_concepts.html#idm140231009075376">Stopping</a></li> |
71 |
<li·title="Handling·Other·Messages"><a·href="gen_server_concepts.html#idm1 |
71 | <li·title="Handling·Other·Messages"><a·href="gen_server_concepts.html#idm140231008621744">Handling·Other·Messages</a></li> |
72 | </ul> | 72 | </ul> |
73 | </li> | 73 | </li> |
74 | <li·id="loadscrollpos"·title="Gen_Fsm·Behaviour"·expanded="true">Gen_Fsm·Behaviour<ul> | 74 | <li·id="loadscrollpos"·title="Gen_Fsm·Behaviour"·expanded="true">Gen_Fsm·Behaviour<ul> |
75 | <li><a·href="fsm.html"> | 75 | <li><a·href="fsm.html"> |
76 | ··············Top·of·chapter | 76 | ··············Top·of·chapter |
77 | ············</a></li> | 77 | ············</a></li> |
78 |
<li·title="Finite·State·Machines"><a·href="fsm.html#idm1 |
78 | <li·title="Finite·State·Machines"><a·href="fsm.html#idm140231009090752">Finite·State·Machines</a></li> |
79 |
<li·title="Example"><a·href="fsm.html#idm1 |
79 | <li·title="Example"><a·href="fsm.html#idm140231008799248">Example</a></li> |
80 |
<li·title="Starting·a·Gen_Fsm"><a·href="fsm.html#idm1 |
80 | <li·title="Starting·a·Gen_Fsm"><a·href="fsm.html#idm140231009551600">Starting·a·Gen_Fsm</a></li> |
81 |
<li·title="Notifying·About·Events"><a·href="fsm.html#idm1 |
81 | <li·title="Notifying·About·Events"><a·href="fsm.html#idm140231009115360">Notifying·About·Events</a></li> |
82 |
<li·title="Timeouts"><a·href="fsm.html#idm1 |
82 | <li·title="Timeouts"><a·href="fsm.html#idm140231009808544">Timeouts</a></li> |
83 |
<li·title="All·State·Events"><a·href="fsm.html#idm1 |
83 | <li·title="All·State·Events"><a·href="fsm.html#idm140231009303152">All·State·Events</a></li> |
84 |
<li·title="Stopping"><a·href="fsm.html#idm1 |
84 | <li·title="Stopping"><a·href="fsm.html#idm140231008912976">Stopping</a></li> |
85 |
<li·title="Handling·Other·Messages"><a·href="fsm.html#idm1 |
85 | <li·title="Handling·Other·Messages"><a·href="fsm.html#idm140231008432688">Handling·Other·Messages</a></li> |
86 | </ul> | 86 | </ul> |
87 | </li> | 87 | </li> |
88 | <li·id="no"·title="Gen_Event·Behaviour"·expanded="false">Gen_Event·Behaviour<ul> | 88 | <li·id="no"·title="Gen_Event·Behaviour"·expanded="false">Gen_Event·Behaviour<ul> |
89 | <li><a·href="events.html"> | 89 | <li><a·href="events.html"> |
90 | ··············Top·of·chapter | 90 | ··············Top·of·chapter |
91 | ············</a></li> | 91 | ············</a></li> |
92 |
<li·title="Event·Handling·Principles"><a·href="events.html#idm1 |
92 | <li·title="Event·Handling·Principles"><a·href="events.html#idm140231009179392">Event·Handling·Principles</a></li> |
93 |
<li·title="Example"><a·href="events.html#idm1 |
93 | <li·title="Example"><a·href="events.html#idm140231008417152">Example</a></li> |
94 |
<li·title="Starting·an·Event·Manager"><a·href="events.html#idm1 |
94 | <li·title="Starting·an·Event·Manager"><a·href="events.html#idm140231008413136">Starting·an·Event·Manager</a></li> |
95 |
<li·title="Adding·an·Event·Handler"><a·href="events.html#idm1 |
95 | <li·title="Adding·an·Event·Handler"><a·href="events.html#idm140231009388752">Adding·an·Event·Handler</a></li> |
96 |
<li·title="Notifying·About·Events"><a·href="events.html#idm1 |
96 | <li·title="Notifying·About·Events"><a·href="events.html#idm140231008728512">Notifying·About·Events</a></li> |
97 |
<li·title="Deleting·an·Event·Handler"><a·href="events.html#idm1 |
97 | <li·title="Deleting·an·Event·Handler"><a·href="events.html#idm140231008720736">Deleting·an·Event·Handler</a></li> |
98 |
<li·title="Stopping"><a·href="events.html#idm1 |
98 | <li·title="Stopping"><a·href="events.html#idm140231008689408">Stopping</a></li> |
99 |
<li·title="Handling·Other·Messages"><a·href="events.html#idm1 |
99 | <li·title="Handling·Other·Messages"><a·href="events.html#idm140231008683248">Handling·Other·Messages</a></li> |
100 | </ul> | 100 | </ul> |
101 | </li> | 101 | </li> |
102 | <li·id="no"·title="Supervisor·Behaviour"·expanded="false">Supervisor·Behaviour<ul> | 102 | <li·id="no"·title="Supervisor·Behaviour"·expanded="false">Supervisor·Behaviour<ul> |
103 | <li><a·href="sup_princ.html"> | 103 | <li><a·href="sup_princ.html"> |
104 | ··············Top·of·chapter | 104 | ··············Top·of·chapter |
105 | ············</a></li> | 105 | ············</a></li> |
106 |
<li·title="Supervision·Principles"><a·href="sup_princ.html#idm1 |
106 | <li·title="Supervision·Principles"><a·href="sup_princ.html#idm140231008291744">Supervision·Principles</a></li> |
107 |
<li·title="Example"><a·href="sup_princ.html#idm1 |
107 | <li·title="Example"><a·href="sup_princ.html#idm140231009682528">Example</a></li> |
108 |
<li·title="Restart·Strategy"><a·href="sup_princ.html#idm1 |
108 | <li·title="Restart·Strategy"><a·href="sup_princ.html#idm140231009629632">Restart·Strategy</a></li> |
109 |
<li·title="Maximum·Restart·Frequency"><a·href="sup_princ.html#idm1 |
109 | <li·title="Maximum·Restart·Frequency"><a·href="sup_princ.html#idm140231008896368">Maximum·Restart·Frequency</a></li> |
110 |
<li·title="Child·Specification"><a·href="sup_princ.html#idm1 |
110 | <li·title="Child·Specification"><a·href="sup_princ.html#idm140231008285744">Child·Specification</a></li> |
111 |
<li·title="Starting·a·Supervisor"><a·href="sup_princ.html#idm1 |
111 | <li·title="Starting·a·Supervisor"><a·href="sup_princ.html#idm140231008253328">Starting·a·Supervisor</a></li> |
112 |
<li·title="Adding·a·Child·Process"><a·href="sup_princ.html#idm1 |
112 | <li·title="Adding·a·Child·Process"><a·href="sup_princ.html#idm140231008242208">Adding·a·Child·Process</a></li> |
113 |
<li·title="Stopping·a·Child·Process"><a·href="sup_princ.html#idm1 |
113 | <li·title="Stopping·a·Child·Process"><a·href="sup_princ.html#idm140231008237824">Stopping·a·Child·Process</a></li> |
114 |
<li·title="Simple-One-For-One·Supervisors"><a·href="sup_princ.html#idm1 |
114 | <li·title="Simple-One-For-One·Supervisors"><a·href="sup_princ.html#idm140231008233024">Simple-One-For-One·Supervisors</a></li> |
115 |
<li·title="Stopping"><a·href="sup_princ.html#idm1 |
115 | <li·title="Stopping"><a·href="sup_princ.html#idm140231008218080">Stopping</a></li> |
116 | </ul> | 116 | </ul> |
117 | </li> | 117 | </li> |
118 | <li·id="no"·title="Sys·and·Proc_Lib"·expanded="false">Sys·and·Proc_Lib<ul> | 118 | <li·id="no"·title="Sys·and·Proc_Lib"·expanded="false">Sys·and·Proc_Lib<ul> |
119 | <li><a·href="spec_proc.html"> | 119 | <li><a·href="spec_proc.html"> |
120 | ··············Top·of·chapter | 120 | ··············Top·of·chapter |
121 | ············</a></li> | 121 | ············</a></li> |
122 |
<li·title="Simple·Debugging"><a·href="spec_proc.html#idm1 |
122 | <li·title="Simple·Debugging"><a·href="spec_proc.html#idm140231008206384">Simple·Debugging</a></li> |
123 |
<li·title="Special·Processes"><a·href="spec_proc.html#idm1 |
123 | <li·title="Special·Processes"><a·href="spec_proc.html#idm140231008196256">Special·Processes</a></li> |
124 |
<li·title="User-Defined·Behaviours"><a·href="spec_proc.html#idm1 |
124 | <li·title="User-Defined·Behaviours"><a·href="spec_proc.html#idm140231008119008">User-Defined·Behaviours</a></li> |
125 | </ul> | 125 | </ul> |
126 | </li> | 126 | </li> |
127 | <li·id="no"·title="Applications"·expanded="false">Applications<ul> | 127 | <li·id="no"·title="Applications"·expanded="false">Applications<ul> |
128 | <li><a·href="applications.html"> | 128 | <li><a·href="applications.html"> |
129 | ··············Top·of·chapter | 129 | ··············Top·of·chapter |
130 | ············</a></li> | 130 | ············</a></li> |
131 |
<li·title="Application·Concept"><a·href="applications.html#idm1 |
131 | <li·title="Application·Concept"><a·href="applications.html#idm140231008095264">Application·Concept</a></li> |
132 |
<li·title="Application·Callback·Module"><a·href="applications.html#idm1 |
132 | <li·title="Application·Callback·Module"><a·href="applications.html#idm140231008087216">Application·Callback·Module</a></li> |
133 |
<li·title="Application·Resource·File"><a·href="applications.html#idm1 |
133 | <li·title="Application·Resource·File"><a·href="applications.html#idm140231008073536">Application·Resource·File</a></li> |
134 |
<li·title="Directory·Structure"><a·href="applications.html#idm1 |
134 | <li·title="Directory·Structure"><a·href="applications.html#idm140231008043200">Directory·Structure</a></li> |
135 |
<li·title="Application·Controller"><a·href="applications.html#idm1 |
135 | <li·title="Application·Controller"><a·href="applications.html#idm140231008028064">Application·Controller</a></li> |
136 |
<li·title="Loading·and·Unloading·Applications"><a·href="applications.html#idm1 |
136 | <li·title="Loading·and·Unloading·Applications"><a·href="applications.html#idm140231008024128">Loading·and·Unloading·Applications</a></li> |
137 |
<li·title="Starting·and·Stopping·Applications"><a·href="applications.html#idm1 |
137 | <li·title="Starting·and·Stopping·Applications"><a·href="applications.html#idm140231008016672">Starting·and·Stopping·Applications</a></li> |
138 |
<li·title="Configuring·an·Application"><a·href="applications.html#idm1 |
138 | <li·title="Configuring·an·Application"><a·href="applications.html#idm140231008006160">Configuring·an·Application</a></li> |
139 |
<li·title="Application·Start·Types"><a·href="applications.html#idm1 |
139 | <li·title="Application·Start·Types"><a·href="applications.html#idm140231007982224">Application·Start·Types</a></li> |
140 | </ul> | 140 | </ul> |
141 | </li> | 141 | </li> |
142 | <li·id="no"·title="Included·Applications"·expanded="false">Included·Applications<ul> | 142 | <li·id="no"·title="Included·Applications"·expanded="false">Included·Applications<ul> |
143 | <li><a·href="included_applications.html"> | 143 | <li><a·href="included_applications.html"> |
144 | ··············Top·of·chapter | 144 | ··············Top·of·chapter |
145 | ············</a></li> | 145 | ············</a></li> |
146 |
<li·title="Definition"><a·href="included_applications.html#idm1 |
146 | <li·title="Definition"><a·href="included_applications.html#idm140231007965456">Definition</a></li> |
147 |
<li·title="Specifying·Included·Applications"><a·href="included_applications.html#idm1 |
147 | <li·title="Specifying·Included·Applications"><a·href="included_applications.html#idm140231007957600">Specifying·Included·Applications</a></li> |
148 |
<li·title="Synchronizing·Processes·During·Startup"><a·href="included_applications.html#idm1 |
148 | <li·title="Synchronizing·Processes·During·Startup"><a·href="included_applications.html#idm140231007954560">Synchronizing·Processes·During·Startup</a></li> |
149 | </ul> | 149 | </ul> |
150 | </li> | 150 | </li> |
151 | <li·id="no"·title="Distributed·Applications"·expanded="false">Distributed·Applications<ul> | 151 | <li·id="no"·title="Distributed·Applications"·expanded="false">Distributed·Applications<ul> |
152 | <li><a·href="distributed_applications.html"> | 152 | <li><a·href="distributed_applications.html"> |
153 | ··············Top·of·chapter | 153 | ··············Top·of·chapter |
154 | ············</a></li> | 154 | ············</a></li> |
155 |
<li·title="Definition"><a·href="distributed_applications.html#idm1 |
155 | <li·title="Definition"><a·href="distributed_applications.html#idm140231007928960">Definition</a></li> |
156 |
<li·title="Specifying·Distributed·Applications"><a·href="distributed_applications.html#idm1 |
156 | <li·title="Specifying·Distributed·Applications"><a·href="distributed_applications.html#idm140231007924640">Specifying·Distributed·Applications</a></li> |
157 |
<li·title="Starting·and·Stopping·Distributed·Applications"><a·href="distributed_applications.html#idm1 |
157 | <li·title="Starting·and·Stopping·Distributed·Applications"><a·href="distributed_applications.html#idm140231007899872">Starting·and·Stopping·Distributed·Applications</a></li> |
158 |
<li·title="Failover"><a·href="distributed_applications.html#idm1 |
158 | <li·title="Failover"><a·href="distributed_applications.html#idm140231007887632">Failover</a></li> |
159 |
<li·title="Takeover"><a·href="distributed_applications.html#idm1 |
159 | <li·title="Takeover"><a·href="distributed_applications.html#idm140231007870560">Takeover</a></li> |
160 | </ul> | 160 | </ul> |
161 | </li> | 161 | </li> |
162 | <li·id="no"·title="Releases"·expanded="false">Releases<ul> | 162 | <li·id="no"·title="Releases"·expanded="false">Releases<ul> |
163 | <li><a·href="release_structure.html"> | 163 | <li><a·href="release_structure.html"> |
164 | ··············Top·of·chapter | 164 | ··············Top·of·chapter |
165 | ············</a></li> | 165 | ············</a></li> |
166 |
<li·title="Release·Concept"><a·href="release_structure.html#idm1 |
166 | <li·title="Release·Concept"><a·href="release_structure.html#idm140231007847120">Release·Concept</a></li> |
167 |
<li·title="Release·Resource·File"><a·href="release_structure.html#idm1 |
167 | <li·title="Release·Resource·File"><a·href="release_structure.html#idm140231007840816">Release·Resource·File</a></li> |
168 |
<li·title="Generating·Boot·Scripts"><a·href="release_structure.html#idm1 |
168 | <li·title="Generating·Boot·Scripts"><a·href="release_structure.html#idm140231007823104">Generating·Boot·Scripts</a></li> |
169 |
<li·title="Creating·a·Release·Package"><a·href="release_structure.html#idm1 |
169 | <li·title="Creating·a·Release·Package"><a·href="release_structure.html#idm140231007811840">Creating·a·Release·Package</a></li> |
170 |
<li·title="Directory·Structure"><a·href="release_structure.html#idm1 |
170 | <li·title="Directory·Structure"><a·href="release_structure.html#idm140231007794016">Directory·Structure</a></li> |
171 | </ul> | 171 | </ul> |
172 | </li> | 172 | </li> |
173 | <li·id="no"·title="Release·Handling"·expanded="false">Release·Handling<ul> | 173 | <li·id="no"·title="Release·Handling"·expanded="false">Release·Handling<ul> |
174 | <li><a·href="release_handling.html"> | 174 | <li><a·href="release_handling.html"> |
175 | ··············Top·of·chapter | 175 | ··············Top·of·chapter |
176 | ············</a></li> | 176 | ············</a></li> |
177 |
<li·title="Release·Handling·Principles"><a·href="release_handling.html#idm1 |
177 | <li·title="Release·Handling·Principles"><a·href="release_handling.html#idm140231007763648">Release·Handling·Principles</a></li> |
178 |
<li·title="Requirements"><a·href="release_handling.html#idm1 |
178 | <li·title="Requirements"><a·href="release_handling.html#idm140231007734288">Requirements</a></li> |
179 |
<li·title="Distributed·Systems"><a·href="release_handling.html#idm1 |
179 | <li·title="Distributed·Systems"><a·href="release_handling.html#idm140231007723152">Distributed·Systems</a></li> |
180 |
<li·title="Release·Handling·Instructions"><a·href="release_handling.html#idm1 |
180 | <li·title="Release·Handling·Instructions"><a·href="release_handling.html#idm140231007719984">Release·Handling·Instructions</a></li> |
181 |
<li·title="Application·Upgrade·File"><a·href="release_handling.html#idm1 |
181 | <li·title="Application·Upgrade·File"><a·href="release_handling.html#idm140231007656768">Application·Upgrade·File</a></li> |
182 |
<li·title="Release·Upgrade·File"><a·href="release_handling.html#idm1 |
182 | <li·title="Release·Upgrade·File"><a·href="release_handling.html#idm140231007634928">Release·Upgrade·File</a></li> |
183 |
<li·title="Installing·a·Release"><a·href="release_handling.html#idm1 |
183 | <li·title="Installing·a·Release"><a·href="release_handling.html#idm140231007616192">Installing·a·Release</a></li> |
184 |
<li·title="Updating·Application·Specifications"><a·href="release_handling.html#idm1 |
184 | <li·title="Updating·Application·Specifications"><a·href="release_handling.html#idm140231007559712">Updating·Application·Specifications</a></li> |
185 | </ul> | 185 | </ul> |
186 | </li> | 186 | </li> |
187 | <li·id="no"·title="Appup·Cookbook"·expanded="false">Appup·Cookbook<ul> | 187 | <li·id="no"·title="Appup·Cookbook"·expanded="false">Appup·Cookbook<ul> |
188 | <li><a·href="appup_cookbook.html"> | 188 | <li><a·href="appup_cookbook.html"> |
189 | ··············Top·of·chapter | 189 | ··············Top·of·chapter |
190 | ············</a></li> | 190 | ············</a></li> |
191 |
<li·title="Changing·a·Functional·Module"><a·href="appup_cookbook.html#idm1 |
191 | <li·title="Changing·a·Functional·Module"><a·href="appup_cookbook.html#idm140231007537632">Changing·a·Functional·Module</a></li> |
192 |
<li·title="Changing·a·Residence·Module"><a·href="appup_cookbook.html#idm1 |
192 | <li·title="Changing·a·Residence·Module"><a·href="appup_cookbook.html#idm140231007534896">Changing·a·Residence·Module</a></li> |
193 |
<li·title="Changing·a·Callback·Module"><a·href="appup_cookbook.html#idm1 |
193 | <li·title="Changing·a·Callback·Module"><a·href="appup_cookbook.html#idm140231007530240">Changing·a·Callback·Module</a></li> |
194 |
<li·title="Changing·Internal·State"><a·href="appup_cookbook.html#idm1 |
194 | <li·title="Changing·Internal·State"><a·href="appup_cookbook.html#idm140231007524112">Changing·Internal·State</a></li> |
195 |
<li·title="Module·Dependencies"><a·href="appup_cookbook.html#idm1 |
195 | <li·title="Module·Dependencies"><a·href="appup_cookbook.html#idm140231007507968">Module·Dependencies</a></li> |
196 |
<li·title="Changing·Code·For·a·Special·Process"><a·href="appup_cookbook.html#idm1 |
196 | <li·title="Changing·Code·For·a·Special·Process"><a·href="appup_cookbook.html#idm140231007487488">Changing·Code·For·a·Special·Process</a></li> |
197 |
<li·title="Changing·a·Supervisor"><a·href="appup_cookbook.html#idm1 |
197 | <li·title="Changing·a·Supervisor"><a·href="appup_cookbook.html#idm140231007467472">Changing·a·Supervisor</a></li> |
198 |
<li·title="Adding·or·Deleting·a·Module"><a·href="appup_cookbook.html#idm1 |
198 | <li·title="Adding·or·Deleting·a·Module"><a·href="appup_cookbook.html#idm140231007437968">Adding·or·Deleting·a·Module</a></li> |
199 |
<li·title="Starting·or·Terminating·a·Process"><a·href="appup_cookbook.html#idm1 |
199 | <li·title="Starting·or·Terminating·a·Process"><a·href="appup_cookbook.html#idm140231007434928">Starting·or·Terminating·a·Process</a></li> |
200 |
<li·title="Adding·or·Removing·an·Application"><a·href="appup_cookbook.html#idm1 |
200 | <li·title="Adding·or·Removing·an·Application"><a·href="appup_cookbook.html#idm140231007432704">Adding·or·Removing·an·Application</a></li> |
201 |
<li·title="Restarting·an·Application"><a·href="appup_cookbook.html#idm1 |
201 | <li·title="Restarting·an·Application"><a·href="appup_cookbook.html#idm140231007429024">Restarting·an·Application</a></li> |
202 |
<li·title="Changing·an·Application·Specification"><a·href="appup_cookbook.html#idm1 |
202 | <li·title="Changing·an·Application·Specification"><a·href="appup_cookbook.html#idm140231007423968">Changing·an·Application·Specification</a></li> |
203 |
<li·title="Changing·Application·Configuration"><a·href="appup_cookbook.html#idm1 |
203 | <li·title="Changing·Application·Configuration"><a·href="appup_cookbook.html#idm140231007421104">Changing·Application·Configuration</a></li> |
204 |
<li·title="Changing·Included·Applications"><a·href="appup_cookbook.html#idm1 |
204 | <li·title="Changing·Included·Applications"><a·href="appup_cookbook.html#idm140231007417088">Changing·Included·Applications</a></li> |
205 |
<li·title="Changing·Non-Erlang·Code"><a·href="appup_cookbook.html#idm1 |
205 | <li·title="Changing·Non-Erlang·Code"><a·href="appup_cookbook.html#idm140231007388304">Changing·Non-Erlang·Code</a></li> |
206 |
<li·title="Emulator·Restart·and·Upgrade"><a·href="appup_cookbook.html#idm1 |
206 | <li·title="Emulator·Restart·and·Upgrade"><a·href="appup_cookbook.html#idm140231007378160">Emulator·Restart·and·Upgrade</a></li> |
207 |
<li·title="Emulator·Upgrade·from·pre·OTP·R15"><a·href="appup_cookbook.html#idm1 |
207 | <li·title="Emulator·Upgrade·from·pre·OTP·R15"><a·href="appup_cookbook.html#idm140231007368976">Emulator·Upgrade·from·pre·OTP·R15</a></li> |
208 | </ul> | 208 | </ul> |
209 | </li> | 209 | </li> |
210 | </ul> | 210 | </ul> |
211 | </div></div> | 211 | </div></div> |
212 | <div·id="content"> | 212 | <div·id="content"> |
213 | <div·class="innertube"> | 213 | <div·class="innertube"> |
214 | <h1>3 Gen_Fsm·Behaviour</h1> | 214 | <h1>3 Gen_Fsm·Behaviour</h1> |
215 | ·· | 215 | ·· |
216 | ··<p>This·chapter·should·be·read·in·conjunction·with·<span·class="code">gen_fsm(3)</span>, | 216 | ··<p>This·chapter·should·be·read·in·conjunction·with·<span·class="code">gen_fsm(3)</span>, |
217 | ····where·all·interface·functions·and·callback·functions·are·described | 217 | ····where·all·interface·functions·and·callback·functions·are·described |
218 | ····in·detail.</p> | 218 | ····in·detail.</p> |
219 |
··<h3><a·name="idm1 |
219 | ··<h3><a·name="idm140231009090752">3.1 |
220 | ········Finite·State·Machines</a></h3> | 220 | ········Finite·State·Machines</a></h3> |
221 | ···· | 221 | ···· |
222 | ····<p>A·finite·state·machine,·FSM,·can·be·described·as·a·set·of | 222 | ····<p>A·finite·state·machine,·FSM,·can·be·described·as·a·set·of |
223 | ······relations·of·the·form:</p> | 223 | ······relations·of·the·form:</p> |
224 | ····<div·class="example"><pre> | 224 | ····<div·class="example"><pre> |
225 | State(S)·x·Event(E)·->·Actions(A),·State(S')</pre></div> | 225 | State(S)·x·Event(E)·->·Actions(A),·State(S')</pre></div> |
226 | ····<p>These·relations·are·interpreted·as·meaning:</p> | 226 | ····<p>These·relations·are·interpreted·as·meaning:</p> |
Offset 235, 15 lines modified | Offset 235, 15 lines modified | ||
235 | ······functions·which·conform·to·the·following·convention:</p> | 235 | ······functions·which·conform·to·the·following·convention:</p> |
236 | ····<div·class="example"><pre> | 236 | ····<div·class="example"><pre> |
237 | StateName(Event,·StateData)·-> | 237 | StateName(Event,·StateData)·-> |
238 | ····..·code·for·actions·here·... | 238 | ····..·code·for·actions·here·... |
239 | ····{next_state,·StateName',·StateData'}</pre></div> | 239 | ····{next_state,·StateName',·StateData'}</pre></div> |
240 | ·· | 240 | ·· |
241 |
··<h3><a·name="idm1 |
241 | ··<h3><a·name="idm140231008799248">3.2 |
242 | ········Example</a></h3> | 242 | ········Example</a></h3> |
243 | ···· | 243 | ···· |
244 | ····<p>A·door·with·a·code·lock·could·be·viewed·as·an·FSM.·Initially, | 244 | ····<p>A·door·with·a·code·lock·could·be·viewed·as·an·FSM.·Initially, |
245 | ······the·door·is·locked.·Anytime·someone·presses·a·button,·this | 245 | ······the·door·is·locked.·Anytime·someone·presses·a·button,·this |
246 | ······generates·an·event.·Depending·on·what·buttons·have·been·pressed | 246 | ······generates·an·event.·Depending·on·what·buttons·have·been·pressed |
247 | ······before,·the·sequence·so·far·may·be·correct,·incomplete·or·wrong.</p> | 247 | ······before,·the·sequence·so·far·may·be·correct,·incomplete·or·wrong.</p> |
248 | ····<p>If·it·is·correct,·the·door·is·unlocked·for·30·seconds·(30000·ms). | 248 | ····<p>If·it·is·correct,·the·door·is·unlocked·for·30·seconds·(30000·ms). |
Offset 283, 15 lines modified | Offset 283, 15 lines modified | ||
283 | open(timeout,·State)·-> | 283 | open(timeout,·State)·-> |
284 | ····do_lock(), | 284 | ····do_lock(), |
285 | ····{next_state,·locked,·State}.</pre></div> | 285 | ····{next_state,·locked,·State}.</pre></div> |
286 | ····<p>The·code·is·explained·in·the·next·sections.</p> | 286 | ····<p>The·code·is·explained·in·the·next·sections.</p> |
287 | ·· | 287 | ·· |
288 |
··<h3><a·name="idm1 |
288 | ··<h3><a·name="idm140231009551600">3.3 |
289 | ········Starting·a·Gen_Fsm</a></h3> | 289 | ········Starting·a·Gen_Fsm</a></h3> |
290 | ···· | 290 | ···· |
291 | ····<p>In·the·example·in·the·previous·section,·the·gen_fsm·is·started·by | 291 | ····<p>In·the·example·in·the·previous·section,·the·gen_fsm·is·started·by |
292 | ······calling·<span·class="code">code_lock:start_link(Code)</span>:</p> | 292 | ······calling·<span·class="code">code_lock:start_link(Code)</span>:</p> |
293 | ····<div·class="example"><pre> | 293 | ····<div·class="example"><pre> |
294 | start_link(Code)·-> | 294 | start_link(Code)·-> |
295 | ····gen_fsm:start_link({local,·code_lock},·code_lock,·lists:reverse(Code),·[]). | 295 | ····gen_fsm:start_link({local,·code_lock},·code_lock,·lists:reverse(Code),·[]). |
Offset 346, 15 lines modified | Offset 346, 15 lines modified | ||
346 | ······receive·notifications.</p> | 346 | ······receive·notifications.</p> |
347 | ····<p><span·class="code">gen_fsm:start_link</span>·must·be·used·if·the·gen_fsm·is·part·of | 347 | ····<p><span·class="code">gen_fsm:start_link</span>·must·be·used·if·the·gen_fsm·is·part·of |
348 | ······a·supervision·tree,·i.e.·is·started·by·a·supervisor.·There·is | 348 | ······a·supervision·tree,·i.e.·is·started·by·a·supervisor.·There·is |
349 | ······another·function·<span·class="code">gen_fsm:start</span>·to·start·a·stand-alone | 349 | ······another·function·<span·class="code">gen_fsm:start</span>·to·start·a·stand-alone |
350 | ······gen_fsm,·i.e.·a·gen_fsm·which·is·not·part·of·a·supervision·tree.</p> | 350 | ······gen_fsm,·i.e.·a·gen_fsm·which·is·not·part·of·a·supervision·tree.</p> |
351 | ·· | 351 | ·· |
352 |
··<h3><a·name="idm1 |
352 | ··<h3><a·name="idm140231009115360">3.4 |
353 | ········Notifying·About·Events</a></h3> | 353 | ········Notifying·About·Events</a></h3> |
354 | ···· | 354 | ···· |
355 | ····<p>The·function·notifying·the·code·lock·about·a·button·event·is | 355 | ····<p>The·function·notifying·the·code·lock·about·a·button·event·is |
356 | ······implemented·using·<span·class="code">gen_fsm:send_event/2</span>:</p> | 356 | ······implemented·using·<span·class="code">gen_fsm:send_event/2</span>:</p> |
357 | ····<div·class="example"><pre> | 357 | ····<div·class="example"><pre> |
358 | button(Digit)·-> | 358 | button(Digit)·-> |
359 | ····gen_fsm:send_event(code_lock,·{button,·Digit}).</pre></div> | 359 | ····gen_fsm:send_event(code_lock,·{button,·Digit}).</pre></div> |
Offset 387, 15 lines modified | Offset 387, 15 lines modified | ||
387 | ····<p>If·the·door·is·locked·and·a·button·is·pressed,·the·complete | 387 | ····<p>If·the·door·is·locked·and·a·button·is·pressed,·the·complete |
388 | ······button·sequence·so·far·is·compared·with·the·correct·code·for | 388 | ······button·sequence·so·far·is·compared·with·the·correct·code·for |
389 | ······the·lock·and,·depending·on·the·result,·the·door·is·either·unlocked | 389 | ······the·lock·and,·depending·on·the·result,·the·door·is·either·unlocked |
390 | ······and·the·gen_fsm·goes·to·state·<span·class="code">open</span>,·or·the·door·remains·in | 390 | ······and·the·gen_fsm·goes·to·state·<span·class="code">open</span>,·or·the·door·remains·in |
391 | ······state·<span·class="code">locked</span>.</p> | 391 | ······state·<span·class="code">locked</span>.</p> |
392 | ·· | 392 | ·· |
393 |
··<h3><a·name="idm1 |
393 | ··<h3><a·name="idm140231009808544">3.5 |
394 | ········Timeouts</a></h3> | 394 | ········Timeouts</a></h3> |
395 | ···· | 395 | ···· |
396 | ····<p>When·a·correct·code·has·been·given,·the·door·is·unlocked·and | 396 | ····<p>When·a·correct·code·has·been·given,·the·door·is·unlocked·and |
397 | ······the·following·tuple·is·returned·from·<span·class="code">locked/2</span>:</p> | 397 | ······the·following·tuple·is·returned·from·<span·class="code">locked/2</span>:</p> |
398 | ····<div·class="example"><pre> | 398 | ····<div·class="example"><pre> |
399 | {next_state,·open,·{[],·Code},·30000};</pre></div> | 399 | {next_state,·open,·{[],·Code},·30000};</pre></div> |
400 | ····<p>30000·is·a·timeout·value·in·milliseconds.·After·30000·ms,·i.e. | 400 | ····<p>30000·is·a·timeout·value·in·milliseconds.·After·30000·ms,·i.e. |
Offset 404, 15 lines modified | Offset 404, 15 lines modified | ||
404 | ······the·door·is·locked·again:</p> | 404 | ······the·door·is·locked·again:</p> |
405 | ····<div·class="example"><pre> | 405 | ····<div·class="example"><pre> |
406 | open(timeout,·State)·-> | 406 | open(timeout,·State)·-> |
407 | ····do_lock(), | 407 | ····do_lock(), |
408 | ····{next_state,·locked,·State}.</pre></div> | 408 | ····{next_state,·locked,·State}.</pre></div> |
409 | ·· | 409 | ·· |
410 |
··<h3><a·name="idm1 |
410 | ··<h3><a·name="idm140231009303152">3.6 |
411 | ········All·State·Events</a></h3> | 411 | ········All·State·Events</a></h3> |
412 | ···· | 412 | ···· |
413 | ····<p>Sometimes·an·event·can·arrive·at·any·state·of·the·gen_fsm. | 413 | ····<p>Sometimes·an·event·can·arrive·at·any·state·of·the·gen_fsm. |
414 | ······Instead·of·sending·the·message·with·<span·class="code">gen_fsm:send_event/2</span> | 414 | ······Instead·of·sending·the·message·with·<span·class="code">gen_fsm:send_event/2</span> |
415 | ······and·writing·one·clause·handling·the·event·for·each·state·function, | 415 | ······and·writing·one·clause·handling·the·event·for·each·state·function, |
416 | ······the·message·can·be·sent·with·<span·class="code">gen_fsm:send_all_state_event/2</span> | 416 | ······the·message·can·be·sent·with·<span·class="code">gen_fsm:send_all_state_event/2</span> |
417 | ······and·handled·with·<span·class="code">Module:handle_event/3</span>:</p> | 417 | ······and·handled·with·<span·class="code">Module:handle_event/3</span>:</p> |
Offset 427, 15 lines modified | Offset 427, 15 lines modified | ||
427 | ... | 427 | ... |
428 | handle_event(stop,·_StateName,·StateData)·-> | 428 | handle_event(stop,·_StateName,·StateData)·-> |
429 | ····{stop,·normal,·StateData}.</pre></div> | 429 | ····{stop,·normal,·StateData}.</pre></div> |
430 | ·· | 430 | ·· |
431 |
··<h3><a·name="idm1 |
431 | ··<h3><a·name="idm140231008912976">3.7 |
432 | ········Stopping</a></h3> | 432 | ········Stopping</a></h3> |
433 | ···· | 433 | ···· |
434 | ····<h4>In·a·Supervision·Tree</h4> | 434 | ····<h4>In·a·Supervision·Tree</h4> |
435 | ······ | 435 | ······ |
436 | ······<p>If·the·gen_fsm·is·part·of·a·supervision·tree,·no·stop·function | 436 | ······<p>If·the·gen_fsm·is·part·of·a·supervision·tree,·no·stop·function |
437 | ········is·needed.·The·gen_fsm·will·automatically·be·terminated·by·its | 437 | ········is·needed.·The·gen_fsm·will·automatically·be·terminated·by·its |
Offset 487, 15 lines modified | Offset 487, 15 lines modified | ||
487 | ········is·a·new·value·for·the·state·data·of·the·gen_fsm.·This·will | 487 | ········is·a·new·value·for·the·state·data·of·the·gen_fsm.·This·will |
488 | ········cause·the·gen_fsm·to·call | 488 | ········cause·the·gen_fsm·to·call |
489 | ········<span·class="code">terminate(normal,StateName,StateData1)</span>·and·then | 489 | ········<span·class="code">terminate(normal,StateName,StateData1)</span>·and·then |
490 | ········terminate·gracefully:</p> | 490 | ········terminate·gracefully:</p> |
491 | ···· | 491 | ···· |
492 | ·· | 492 | ·· |
493 |
··<h3><a·name="idm1 |
493 | ··<h3><a·name="idm140231008432688">3.8 |
494 | ········Handling·Other·Messages</a></h3> | 494 | ········Handling·Other·Messages</a></h3> |
495 | ···· | 495 | ···· |
496 | ····<p>If·the·gen_fsm·should·be·able·to·receive·other·messages·than | 496 | ····<p>If·the·gen_fsm·should·be·able·to·receive·other·messages·than |
497 | ······events,·the·callback·function·<span·class="code">handle_info(Info,·StateName,·StateData)</span>·must·be·implemented·to·handle·them.·Examples·of | 497 | ······events,·the·callback·function·<span·class="code">handle_info(Info,·StateName,·StateData)</span>·must·be·implemented·to·handle·them.·Examples·of |
498 | ······other·messages·are·exit·messages,·if·the·gen_fsm·is·linked·to | 498 | ······other·messages·are·exit·messages,·if·the·gen_fsm·is·linked·to |
499 | ······other·processes·(than·the·supervisor)·and·trapping·exit·signals.</p> | 499 | ······other·processes·(than·the·supervisor)·and·trapping·exit·signals.</p> |
500 | ····<div·class="example"><pre> | 500 | ····<div·class="example"><pre> |
Offset 47, 183 lines modified | Offset 47, 183 lines modified | ||
47 | <img·alt="Erlang·logo"·src="../erlang-logo.png"><br><small><a·href="users_guide.html">User's·Guide</a><br><a·href="../pdf/otp-system-documentation-6.3.pdf">PDF</a><br><a·href="../index.html">Top</a></small><p><strong>OTP·Design·Principles</strong><br><strong>User's·Guide</strong><br><small>Version·6.3</small></p> | 47 | <img·alt="Erlang·logo"·src="../erlang-logo.png"><br><small><a·href="users_guide.html">User's·Guide</a><br><a·href="../pdf/otp-system-documentation-6.3.pdf">PDF</a><br><a·href="../index.html">Top</a></small><p><strong>OTP·Design·Principles</strong><br><strong>User's·Guide</strong><br><small>Version·6.3</small></p> |
48 | <br><a·href="javascript:openAllFlips()">Expand·All</a><br><a·href="javascript:closeAllFlips()">Contract·All</a><p><small><strong>Chapters</strong></small></p> | 48 | <br><a·href="javascript:openAllFlips()">Expand·All</a><br><a·href="javascript:closeAllFlips()">Contract·All</a><p><small><strong>Chapters</strong></small></p> |
49 | <ul·class="flipMenu"·imagepath="../js/flipmenu"> | 49 | <ul·class="flipMenu"·imagepath="../js/flipmenu"> |
50 | <li·id="no"·title="Overview"·expanded="false">Overview<ul> | 50 | <li·id="no"·title="Overview"·expanded="false">Overview<ul> |
51 | <li><a·href="des_princ.html"> | 51 | <li><a·href="des_princ.html"> |
52 | ··············Top·of·chapter | 52 | ··············Top·of·chapter |
53 | ············</a></li> | 53 | ············</a></li> |
54 |
<li·title="Supervision·Trees"><a·href="des_princ.html#idm1 |
54 | <li·title="Supervision·Trees"><a·href="des_princ.html#idm140231008664592">Supervision·Trees</a></li> |
55 |
<li·title="Behaviours"><a·href="des_princ.html#idm1 |
55 | <li·title="Behaviours"><a·href="des_princ.html#idm140231008672688">Behaviours</a></li> |
56 |
<li·title="Applications"><a·href="des_princ.html#idm1 |
56 | <li·title="Applications"><a·href="des_princ.html#idm140231008752016">Applications</a></li> |
57 |
<li·title="Releases"><a·href="des_princ.html#idm1 |
57 | <li·title="Releases"><a·href="des_princ.html#idm140231008757072">Releases</a></li> |
58 |
<li·title="Release·Handling"><a·href="des_princ.html#idm1 |
58 | <li·title="Release·Handling"><a·href="des_princ.html#idm140231008760592">Release·Handling</a></li> |
59 | </ul> | 59 | </ul> |
60 | </li> | 60 | </li> |
61 | <li·id="loadscrollpos"·title="Gen_Server·Behaviour"·expanded="true">Gen_Server·Behaviour<ul> | 61 | <li·id="loadscrollpos"·title="Gen_Server·Behaviour"·expanded="true">Gen_Server·Behaviour<ul> |
62 | <li><a·href="gen_server_concepts.html"> | 62 | <li><a·href="gen_server_concepts.html"> |
63 | ··············Top·of·chapter | 63 | ··············Top·of·chapter |
64 | ············</a></li> | 64 | ············</a></li> |
65 |
<li·title="Client-Server·Principles"><a·href="gen_server_concepts.html#idm1 |
65 | <li·title="Client-Server·Principles"><a·href="gen_server_concepts.html#idm140231008770128">Client-Server·Principles</a></li> |
66 |
<li·title="Example"><a·href="gen_server_concepts.html#idm1 |
66 | <li·title="Example"><a·href="gen_server_concepts.html#idm140231008697632">Example</a></li> |
67 |
<li·title="Starting·a·Gen_Server"><a·href="gen_server_concepts.html#idm1 |
67 | <li·title="Starting·a·Gen_Server"><a·href="gen_server_concepts.html#idm140231008702000">Starting·a·Gen_Server</a></li> |
68 |
<li·title="Synchronous·Requests·-·Call"><a·href="gen_server_concepts.html#idm1 |
68 | <li·title="Synchronous·Requests·-·Call"><a·href="gen_server_concepts.html#idm140231008776224">Synchronous·Requests·-·Call</a></li> |
69 |
<li·title="Asynchronous·Requests·-·Cast"><a·href="gen_server_concepts.html#idm1 |
69 | <li·title="Asynchronous·Requests·-·Cast"><a·href="gen_server_concepts.html#idm140231008786432">Asynchronous·Requests·-·Cast</a></li> |
70 |
<li·title="Stopping"><a·href="gen_server_concepts.html#idm1 |
70 | <li·title="Stopping"><a·href="gen_server_concepts.html#idm140231009075376">Stopping</a></li> |
71 |
<li·title="Handling·Other·Messages"><a·href="gen_server_concepts.html#idm1 |
71 | <li·title="Handling·Other·Messages"><a·href="gen_server_concepts.html#idm140231008621744">Handling·Other·Messages</a></li> |
72 | </ul> | 72 | </ul> |
73 | </li> | 73 | </li> |
74 | <li·id="no"·title="Gen_Fsm·Behaviour"·expanded="false">Gen_Fsm·Behaviour<ul> | 74 | <li·id="no"·title="Gen_Fsm·Behaviour"·expanded="false">Gen_Fsm·Behaviour<ul> |
75 | <li><a·href="fsm.html"> | 75 | <li><a·href="fsm.html"> |
76 | ··············Top·of·chapter | 76 | ··············Top·of·chapter |
77 | ············</a></li> | 77 | ············</a></li> |
78 |
<li·title="Finite·State·Machines"><a·href="fsm.html#idm1 |
78 | <li·title="Finite·State·Machines"><a·href="fsm.html#idm140231009090752">Finite·State·Machines</a></li> |
79 |
<li·title="Example"><a·href="fsm.html#idm1 |
79 | <li·title="Example"><a·href="fsm.html#idm140231008799248">Example</a></li> |
80 |
<li·title="Starting·a·Gen_Fsm"><a·href="fsm.html#idm1 |
80 | <li·title="Starting·a·Gen_Fsm"><a·href="fsm.html#idm140231009551600">Starting·a·Gen_Fsm</a></li> |
81 |
<li·title="Notifying·About·Events"><a·href="fsm.html#idm1 |
81 | <li·title="Notifying·About·Events"><a·href="fsm.html#idm140231009115360">Notifying·About·Events</a></li> |
82 |
<li·title="Timeouts"><a·href="fsm.html#idm1 |
82 | <li·title="Timeouts"><a·href="fsm.html#idm140231009808544">Timeouts</a></li> |
83 |
<li·title="All·State·Events"><a·href="fsm.html#idm1 |
83 | <li·title="All·State·Events"><a·href="fsm.html#idm140231009303152">All·State·Events</a></li> |
84 |
<li·title="Stopping"><a·href="fsm.html#idm1 |
84 | <li·title="Stopping"><a·href="fsm.html#idm140231008912976">Stopping</a></li> |
85 |
<li·title="Handling·Other·Messages"><a·href="fsm.html#idm1 |
85 | <li·title="Handling·Other·Messages"><a·href="fsm.html#idm140231008432688">Handling·Other·Messages</a></li> |
86 | </ul> | 86 | </ul> |
87 | </li> | 87 | </li> |
88 | <li·id="no"·title="Gen_Event·Behaviour"·expanded="false">Gen_Event·Behaviour<ul> | 88 | <li·id="no"·title="Gen_Event·Behaviour"·expanded="false">Gen_Event·Behaviour<ul> |
89 | <li><a·href="events.html"> | 89 | <li><a·href="events.html"> |
90 | ··············Top·of·chapter | 90 | ··············Top·of·chapter |
91 | ············</a></li> | 91 | ············</a></li> |
92 |
<li·title="Event·Handling·Principles"><a·href="events.html#idm1 |
92 | <li·title="Event·Handling·Principles"><a·href="events.html#idm140231009179392">Event·Handling·Principles</a></li> |
93 |
<li·title="Example"><a·href="events.html#idm1 |
93 | <li·title="Example"><a·href="events.html#idm140231008417152">Example</a></li> |
94 |
<li·title="Starting·an·Event·Manager"><a·href="events.html#idm1 |
94 | <li·title="Starting·an·Event·Manager"><a·href="events.html#idm140231008413136">Starting·an·Event·Manager</a></li> |
95 |
<li·title="Adding·an·Event·Handler"><a·href="events.html#idm1 |
95 | <li·title="Adding·an·Event·Handler"><a·href="events.html#idm140231009388752">Adding·an·Event·Handler</a></li> |
96 |
<li·title="Notifying·About·Events"><a·href="events.html#idm1 |
96 | <li·title="Notifying·About·Events"><a·href="events.html#idm140231008728512">Notifying·About·Events</a></li> |
97 |
<li·title="Deleting·an·Event·Handler"><a·href="events.html#idm1 |
97 | <li·title="Deleting·an·Event·Handler"><a·href="events.html#idm140231008720736">Deleting·an·Event·Handler</a></li> |
98 |
<li·title="Stopping"><a·href="events.html#idm1 |
98 | <li·title="Stopping"><a·href="events.html#idm140231008689408">Stopping</a></li> |
99 |
<li·title="Handling·Other·Messages"><a·href="events.html#idm1 |
99 | <li·title="Handling·Other·Messages"><a·href="events.html#idm140231008683248">Handling·Other·Messages</a></li> |
100 | </ul> | 100 | </ul> |
101 | </li> | 101 | </li> |
102 | <li·id="no"·title="Supervisor·Behaviour"·expanded="false">Supervisor·Behaviour<ul> | 102 | <li·id="no"·title="Supervisor·Behaviour"·expanded="false">Supervisor·Behaviour<ul> |
103 | <li><a·href="sup_princ.html"> | 103 | <li><a·href="sup_princ.html"> |
104 | ··············Top·of·chapter | 104 | ··············Top·of·chapter |
105 | ············</a></li> | 105 | ············</a></li> |
106 |
<li·title="Supervision·Principles"><a·href="sup_princ.html#idm1 |
106 | <li·title="Supervision·Principles"><a·href="sup_princ.html#idm140231008291744">Supervision·Principles</a></li> |
107 |
<li·title="Example"><a·href="sup_princ.html#idm1 |
107 | <li·title="Example"><a·href="sup_princ.html#idm140231009682528">Example</a></li> |
108 |
<li·title="Restart·Strategy"><a·href="sup_princ.html#idm1 |
108 | <li·title="Restart·Strategy"><a·href="sup_princ.html#idm140231009629632">Restart·Strategy</a></li> |
109 |
<li·title="Maximum·Restart·Frequency"><a·href="sup_princ.html#idm1 |
109 | <li·title="Maximum·Restart·Frequency"><a·href="sup_princ.html#idm140231008896368">Maximum·Restart·Frequency</a></li> |
110 |
<li·title="Child·Specification"><a·href="sup_princ.html#idm1 |
110 | <li·title="Child·Specification"><a·href="sup_princ.html#idm140231008285744">Child·Specification</a></li> |
111 |
<li·title="Starting·a·Supervisor"><a·href="sup_princ.html#idm1 |
111 | <li·title="Starting·a·Supervisor"><a·href="sup_princ.html#idm140231008253328">Starting·a·Supervisor</a></li> |
112 |
<li·title="Adding·a·Child·Process"><a·href="sup_princ.html#idm1 |
112 | <li·title="Adding·a·Child·Process"><a·href="sup_princ.html#idm140231008242208">Adding·a·Child·Process</a></li> |
113 |
<li·title="Stopping·a·Child·Process"><a·href="sup_princ.html#idm1 |
113 | <li·title="Stopping·a·Child·Process"><a·href="sup_princ.html#idm140231008237824">Stopping·a·Child·Process</a></li> |
114 |
<li·title="Simple-One-For-One·Supervisors"><a·href="sup_princ.html#idm1 |
114 | <li·title="Simple-One-For-One·Supervisors"><a·href="sup_princ.html#idm140231008233024">Simple-One-For-One·Supervisors</a></li> |
115 |
<li·title="Stopping"><a·href="sup_princ.html#idm1 |
115 | <li·title="Stopping"><a·href="sup_princ.html#idm140231008218080">Stopping</a></li> |
116 | </ul> | 116 | </ul> |
117 | </li> | 117 | </li> |
118 | <li·id="no"·title="Sys·and·Proc_Lib"·expanded="false">Sys·and·Proc_Lib<ul> | 118 | <li·id="no"·title="Sys·and·Proc_Lib"·expanded="false">Sys·and·Proc_Lib<ul> |
119 | <li><a·href="spec_proc.html"> | 119 | <li><a·href="spec_proc.html"> |
120 | ··············Top·of·chapter | 120 | ··············Top·of·chapter |
121 | ············</a></li> | 121 | ············</a></li> |
122 |
<li·title="Simple·Debugging"><a·href="spec_proc.html#idm1 |
122 | <li·title="Simple·Debugging"><a·href="spec_proc.html#idm140231008206384">Simple·Debugging</a></li> |
123 |
<li·title="Special·Processes"><a·href="spec_proc.html#idm1 |
123 | <li·title="Special·Processes"><a·href="spec_proc.html#idm140231008196256">Special·Processes</a></li> |
124 |
<li·title="User-Defined·Behaviours"><a·href="spec_proc.html#idm1 |
124 | <li·title="User-Defined·Behaviours"><a·href="spec_proc.html#idm140231008119008">User-Defined·Behaviours</a></li> |
125 | </ul> | 125 | </ul> |
126 | </li> | 126 | </li> |
127 | <li·id="no"·title="Applications"·expanded="false">Applications<ul> | 127 | <li·id="no"·title="Applications"·expanded="false">Applications<ul> |
128 | <li><a·href="applications.html"> | 128 | <li><a·href="applications.html"> |
129 | ··············Top·of·chapter | 129 | ··············Top·of·chapter |
130 | ············</a></li> | 130 | ············</a></li> |
131 |
<li·title="Application·Concept"><a·href="applications.html#idm1 |
131 | <li·title="Application·Concept"><a·href="applications.html#idm140231008095264">Application·Concept</a></li> |
132 |
<li·title="Application·Callback·Module"><a·href="applications.html#idm1 |
132 | <li·title="Application·Callback·Module"><a·href="applications.html#idm140231008087216">Application·Callback·Module</a></li> |
133 |
<li·title="Application·Resource·File"><a·href="applications.html#idm1 |
133 | <li·title="Application·Resource·File"><a·href="applications.html#idm140231008073536">Application·Resource·File</a></li> |
134 |
<li·title="Directory·Structure"><a·href="applications.html#idm1 |
134 | <li·title="Directory·Structure"><a·href="applications.html#idm140231008043200">Directory·Structure</a></li> |
135 |
<li·title="Application·Controller"><a·href="applications.html#idm1 |
135 | <li·title="Application·Controller"><a·href="applications.html#idm140231008028064">Application·Controller</a></li> |
136 |
<li·title="Loading·and·Unloading·Applications"><a·href="applications.html#idm1 |
136 | <li·title="Loading·and·Unloading·Applications"><a·href="applications.html#idm140231008024128">Loading·and·Unloading·Applications</a></li> |
137 |
<li·title="Starting·and·Stopping·Applications"><a·href="applications.html#idm1 |
137 | <li·title="Starting·and·Stopping·Applications"><a·href="applications.html#idm140231008016672">Starting·and·Stopping·Applications</a></li> |
138 |
<li·title="Configuring·an·Application"><a·href="applications.html#idm1 |
138 | <li·title="Configuring·an·Application"><a·href="applications.html#idm140231008006160">Configuring·an·Application</a></li> |
139 |
<li·title="Application·Start·Types"><a·href="applications.html#idm1 |
139 | <li·title="Application·Start·Types"><a·href="applications.html#idm140231007982224">Application·Start·Types</a></li> |
140 | </ul> | 140 | </ul> |
141 | </li> | 141 | </li> |
142 | <li·id="no"·title="Included·Applications"·expanded="false">Included·Applications<ul> | 142 | <li·id="no"·title="Included·Applications"·expanded="false">Included·Applications<ul> |
143 | <li><a·href="included_applications.html"> | 143 | <li><a·href="included_applications.html"> |
144 | ··············Top·of·chapter | 144 | ··············Top·of·chapter |
145 | ············</a></li> | 145 | ············</a></li> |
146 |
<li·title="Definition"><a·href="included_applications.html#idm1 |
146 | <li·title="Definition"><a·href="included_applications.html#idm140231007965456">Definition</a></li> |
147 |
<li·title="Specifying·Included·Applications"><a·href="included_applications.html#idm1 |
147 | <li·title="Specifying·Included·Applications"><a·href="included_applications.html#idm140231007957600">Specifying·Included·Applications</a></li> |
148 |
<li·title="Synchronizing·Processes·During·Startup"><a·href="included_applications.html#idm1 |
148 | <li·title="Synchronizing·Processes·During·Startup"><a·href="included_applications.html#idm140231007954560">Synchronizing·Processes·During·Startup</a></li> |
149 | </ul> | 149 | </ul> |
150 | </li> | 150 | </li> |
151 | <li·id="no"·title="Distributed·Applications"·expanded="false">Distributed·Applications<ul> | 151 | <li·id="no"·title="Distributed·Applications"·expanded="false">Distributed·Applications<ul> |
152 | <li><a·href="distributed_applications.html"> | 152 | <li><a·href="distributed_applications.html"> |
153 | ··············Top·of·chapter | 153 | ··············Top·of·chapter |
154 | ············</a></li> | 154 | ············</a></li> |
155 |
<li·title="Definition"><a·href="distributed_applications.html#idm1 |
155 | <li·title="Definition"><a·href="distributed_applications.html#idm140231007928960">Definition</a></li> |
156 |
<li·title="Specifying·Distributed·Applications"><a·href="distributed_applications.html#idm1 |
156 | <li·title="Specifying·Distributed·Applications"><a·href="distributed_applications.html#idm140231007924640">Specifying·Distributed·Applications</a></li> |
157 |
<li·title="Starting·and·Stopping·Distributed·Applications"><a·href="distributed_applications.html#idm1 |
157 | <li·title="Starting·and·Stopping·Distributed·Applications"><a·href="distributed_applications.html#idm140231007899872">Starting·and·Stopping·Distributed·Applications</a></li> |
158 |
<li·title="Failover"><a·href="distributed_applications.html#idm1 |
158 | <li·title="Failover"><a·href="distributed_applications.html#idm140231007887632">Failover</a></li> |
159 |
<li·title="Takeover"><a·href="distributed_applications.html#idm1 |
159 | <li·title="Takeover"><a·href="distributed_applications.html#idm140231007870560">Takeover</a></li> |
160 | </ul> | 160 | </ul> |
161 | </li> | 161 | </li> |
162 | <li·id="no"·title="Releases"·expanded="false">Releases<ul> | 162 | <li·id="no"·title="Releases"·expanded="false">Releases<ul> |
163 | <li><a·href="release_structure.html"> | 163 | <li><a·href="release_structure.html"> |
164 | ··············Top·of·chapter | 164 | ··············Top·of·chapter |
165 | ············</a></li> | 165 | ············</a></li> |
166 |
<li·title="Release·Concept"><a·href="release_structure.html#idm1 |
166 | <li·title="Release·Concept"><a·href="release_structure.html#idm140231007847120">Release·Concept</a></li> |
167 |
<li·title="Release·Resource·File"><a·href="release_structure.html#idm1 |
167 | <li·title="Release·Resource·File"><a·href="release_structure.html#idm140231007840816">Release·Resource·File</a></li> |
168 |
<li·title="Generating·Boot·Scripts"><a·href="release_structure.html#idm1 |
168 | <li·title="Generating·Boot·Scripts"><a·href="release_structure.html#idm140231007823104">Generating·Boot·Scripts</a></li> |
169 |
<li·title="Creating·a·Release·Package"><a·href="release_structure.html#idm1 |
169 | <li·title="Creating·a·Release·Package"><a·href="release_structure.html#idm140231007811840">Creating·a·Release·Package</a></li> |
170 |
<li·title="Directory·Structure"><a·href="release_structure.html#idm1 |
170 | <li·title="Directory·Structure"><a·href="release_structure.html#idm140231007794016">Directory·Structure</a></li> |
171 | </ul> | 171 | </ul> |
172 | </li> | 172 | </li> |
173 | <li·id="no"·title="Release·Handling"·expanded="false">Release·Handling<ul> | 173 | <li·id="no"·title="Release·Handling"·expanded="false">Release·Handling<ul> |
174 | <li><a·href="release_handling.html"> | 174 | <li><a·href="release_handling.html"> |
175 | ··············Top·of·chapter | 175 | ··············Top·of·chapter |
176 | ············</a></li> | 176 | ············</a></li> |
177 |
<li·title="Release·Handling·Principles"><a·href="release_handling.html#idm1 |
177 | <li·title="Release·Handling·Principles"><a·href="release_handling.html#idm140231007763648">Release·Handling·Principles</a></li> |
178 |
<li·title="Requirements"><a·href="release_handling.html#idm1 |
178 | <li·title="Requirements"><a·href="release_handling.html#idm140231007734288">Requirements</a></li> |
179 |
<li·title="Distributed·Systems"><a·href="release_handling.html#idm1 |
179 | <li·title="Distributed·Systems"><a·href="release_handling.html#idm140231007723152">Distributed·Systems</a></li> |
180 |
<li·title="Release·Handling·Instructions"><a·href="release_handling.html#idm1 |
180 | <li·title="Release·Handling·Instructions"><a·href="release_handling.html#idm140231007719984">Release·Handling·Instructions</a></li> |
181 |
<li·title="Application·Upgrade·File"><a·href="release_handling.html#idm1 |
181 | <li·title="Application·Upgrade·File"><a·href="release_handling.html#idm140231007656768">Application·Upgrade·File</a></li> |
182 |
<li·title="Release·Upgrade·File"><a·href="release_handling.html#idm1 |
182 | <li·title="Release·Upgrade·File"><a·href="release_handling.html#idm140231007634928">Release·Upgrade·File</a></li> |
183 |
<li·title="Installing·a·Release"><a·href="release_handling.html#idm1 |
183 | <li·title="Installing·a·Release"><a·href="release_handling.html#idm140231007616192">Installing·a·Release</a></li> |
184 |
<li·title="Updating·Application·Specifications"><a·href="release_handling.html#idm1 |
184 | <li·title="Updating·Application·Specifications"><a·href="release_handling.html#idm140231007559712">Updating·Application·Specifications</a></li> |
185 | </ul> | 185 | </ul> |
186 | </li> | 186 | </li> |
187 | <li·id="no"·title="Appup·Cookbook"·expanded="false">Appup·Cookbook<ul> | 187 | <li·id="no"·title="Appup·Cookbook"·expanded="false">Appup·Cookbook<ul> |
188 | <li><a·href="appup_cookbook.html"> | 188 | <li><a·href="appup_cookbook.html"> |
189 | ··············Top·of·chapter | 189 | ··············Top·of·chapter |
190 | ············</a></li> | 190 | ············</a></li> |
191 |
<li·title="Changing·a·Functional·Module"><a·href="appup_cookbook.html#idm1 |
191 | <li·title="Changing·a·Functional·Module"><a·href="appup_cookbook.html#idm140231007537632">Changing·a·Functional·Module</a></li> |
192 |
<li·title="Changing·a·Residence·Module"><a·href="appup_cookbook.html#idm1 |
192 | <li·title="Changing·a·Residence·Module"><a·href="appup_cookbook.html#idm140231007534896">Changing·a·Residence·Module</a></li> |
193 |
<li·title="Changing·a·Callback·Module"><a·href="appup_cookbook.html#idm1 |
193 | <li·title="Changing·a·Callback·Module"><a·href="appup_cookbook.html#idm140231007530240">Changing·a·Callback·Module</a></li> |
194 |
<li·title="Changing·Internal·State"><a·href="appup_cookbook.html#idm1 |
194 | <li·title="Changing·Internal·State"><a·href="appup_cookbook.html#idm140231007524112">Changing·Internal·State</a></li> |
195 |
<li·title="Module·Dependencies"><a·href="appup_cookbook.html#idm1 |
195 | <li·title="Module·Dependencies"><a·href="appup_cookbook.html#idm140231007507968">Module·Dependencies</a></li> |
196 |
<li·title="Changing·Code·For·a·Special·Process"><a·href="appup_cookbook.html#idm1 |
196 | <li·title="Changing·Code·For·a·Special·Process"><a·href="appup_cookbook.html#idm140231007487488">Changing·Code·For·a·Special·Process</a></li> |
197 |
<li·title="Changing·a·Supervisor"><a·href="appup_cookbook.html#idm1 |
197 | <li·title="Changing·a·Supervisor"><a·href="appup_cookbook.html#idm140231007467472">Changing·a·Supervisor</a></li> |
198 |
<li·title="Adding·or·Deleting·a·Module"><a·href="appup_cookbook.html#idm1 |
198 | <li·title="Adding·or·Deleting·a·Module"><a·href="appup_cookbook.html#idm140231007437968">Adding·or·Deleting·a·Module</a></li> |
199 |
<li·title="Starting·or·Terminating·a·Process"><a·href="appup_cookbook.html#idm1 |
199 | <li·title="Starting·or·Terminating·a·Process"><a·href="appup_cookbook.html#idm140231007434928">Starting·or·Terminating·a·Process</a></li> |
200 |
<li·title="Adding·or·Removing·an·Application"><a·href="appup_cookbook.html#idm1 |
200 | <li·title="Adding·or·Removing·an·Application"><a·href="appup_cookbook.html#idm140231007432704">Adding·or·Removing·an·Application</a></li> |
201 |
<li·title="Restarting·an·Application"><a·href="appup_cookbook.html#idm1 |
201 | <li·title="Restarting·an·Application"><a·href="appup_cookbook.html#idm140231007429024">Restarting·an·Application</a></li> |
202 |
<li·title="Changing·an·Application·Specification"><a·href="appup_cookbook.html#idm1 |
202 | <li·title="Changing·an·Application·Specification"><a·href="appup_cookbook.html#idm140231007423968">Changing·an·Application·Specification</a></li> |
203 |
<li·title="Changing·Application·Configuration"><a·href="appup_cookbook.html#idm1 |
203 | <li·title="Changing·Application·Configuration"><a·href="appup_cookbook.html#idm140231007421104">Changing·Application·Configuration</a></li> |
204 |
<li·title="Changing·Included·Applications"><a·href="appup_cookbook.html#idm1 |
204 | <li·title="Changing·Included·Applications"><a·href="appup_cookbook.html#idm140231007417088">Changing·Included·Applications</a></li> |
205 |
<li·title="Changing·Non-Erlang·Code"><a·href="appup_cookbook.html#idm1 |
205 | <li·title="Changing·Non-Erlang·Code"><a·href="appup_cookbook.html#idm140231007388304">Changing·Non-Erlang·Code</a></li> |
206 |
<li·title="Emulator·Restart·and·Upgrade"><a·href="appup_cookbook.html#idm1 |
206 | <li·title="Emulator·Restart·and·Upgrade"><a·href="appup_cookbook.html#idm140231007378160">Emulator·Restart·and·Upgrade</a></li> |
207 |
<li·title="Emulator·Upgrade·from·pre·OTP·R15"><a·href="appup_cookbook.html#idm1 |
207 | <li·title="Emulator·Upgrade·from·pre·OTP·R15"><a·href="appup_cookbook.html#idm140231007368976">Emulator·Upgrade·from·pre·OTP·R15</a></li> |
208 | </ul> | 208 | </ul> |
209 | </li> | 209 | </li> |
210 | </ul> | 210 | </ul> |
211 | </div></div> | 211 | </div></div> |
212 | <div·id="content"> | 212 | <div·id="content"> |
213 | <div·class="innertube"> | 213 | <div·class="innertube"> |
214 | <h1>2 Gen_Server·Behaviour</h1> | 214 | <h1>2 Gen_Server·Behaviour</h1> |
215 | ·· | 215 | ·· |
216 | ··<a·name="gen_server"></a> | 216 | ··<a·name="gen_server"></a> |
217 | ··<p>This·chapter·should·be·read·in·conjunction·with | 217 | ··<p>This·chapter·should·be·read·in·conjunction·with |
218 | ····<span·class="bold_code"><a·href="javascript:erlhref('../../','stdlib','gen_server.html');">gen_server(3)</a></span>, | 218 | ····<span·class="bold_code"><a·href="javascript:erlhref('../../','stdlib','gen_server.html');">gen_server(3)</a></span>, |
219 | ····where·all·interface·functions·and·callback | 219 | ····where·all·interface·functions·and·callback |
220 | ····functions·are·described·in·detail.</p> | 220 | ····functions·are·described·in·detail.</p> |
221 |
··<h3><a·name="idm1 |
221 | ··<h3><a·name="idm140231008770128">2.1 |
222 | ········Client-Server·Principles</a></h3> | 222 | ········Client-Server·Principles</a></h3> |
223 | ···· | 223 | ···· |
224 | ····<p>The·client-server·model·is·characterized·by·a·central·server | 224 | ····<p>The·client-server·model·is·characterized·by·a·central·server |
225 | ······and·an·arbitrary·number·of·clients.·The·client-server·model·is | 225 | ······and·an·arbitrary·number·of·clients.·The·client-server·model·is |
226 | ······generally·used·for·resource·management·operations,·where·several | 226 | ······generally·used·for·resource·management·operations,·where·several |
227 | ······different·clients·want·to·share·a·common·resource.·The·server·is | 227 | ······different·clients·want·to·share·a·common·resource.·The·server·is |
228 | ······responsible·for·managing·this·resource.</p> | 228 | ······responsible·for·managing·this·resource.</p> |
Offset 232, 15 lines modified | Offset 232, 15 lines modified | ||
232 | ······<em>Figure | 232 | ······<em>Figure |
233 | ········2.1: | 233 | ········2.1: |
234 | ········ | 234 | ········ |
235 | ········Client-Server·Model</em> | 235 | ········Client-Server·Model</em> |
236 | ···· | 236 | ···· |
237 | ·· | 237 | ·· |
238 |
··<h3><a·name="idm1 |
238 | ··<h3><a·name="idm140231008697632">2.2 |
239 | ········Example</a></h3> | 239 | ········Example</a></h3> |
240 | ···· | 240 | ···· |
241 | ····<p>An·example·of·a·simple·server·written·in·plain·Erlang·was | 241 | ····<p>An·example·of·a·simple·server·written·in·plain·Erlang·was |
242 | ······given·in·<span·class="bold_code"><a·href="des_princ.html#ch1">Overview</a></span>. | 242 | ······given·in·<span·class="bold_code"><a·href="des_princ.html#ch1">Overview</a></span>. |
243 | ······The·server·can·be·re-implemented·using·<span·class="code">gen_server</span>, | 243 | ······The·server·can·be·re-implemented·using·<span·class="code">gen_server</span>, |
244 | ······resulting·in·this·callback·module:</p> | 244 | ······resulting·in·this·callback·module:</p> |
245 | ····<a·name="ex"></a> | 245 | ····<a·name="ex"></a> |
Offset 270, 15 lines modified | Offset 270, 15 lines modified | ||
270 | handle_cast({free,·Ch},·Chs)·-> | 270 | handle_cast({free,·Ch},·Chs)·-> |
271 | ····Chs2·=·free(Ch,·Chs), | 271 | ····Chs2·=·free(Ch,·Chs), |
272 | ····{noreply,·Chs2}.</pre></div> | 272 | ····{noreply,·Chs2}.</pre></div> |
273 | ····<p>The·code·is·explained·in·the·next·sections.</p> | 273 | ····<p>The·code·is·explained·in·the·next·sections.</p> |
274 | ·· | 274 | ·· |
275 |
··<h3><a·name="idm1 |
275 | ··<h3><a·name="idm140231008702000">2.3 |
276 | ········Starting·a·Gen_Server</a></h3> | 276 | ········Starting·a·Gen_Server</a></h3> |
277 | ···· | 277 | ···· |
278 | ····<p>In·the·example·in·the·previous·section,·the·gen_server·is·started | 278 | ····<p>In·the·example·in·the·previous·section,·the·gen_server·is·started |
279 | ······by·calling·<span·class="code">ch3:start_link()</span>:</p> | 279 | ······by·calling·<span·class="code">ch3:start_link()</span>:</p> |
280 | ····<div·class="example"><pre> | 280 | ····<div·class="example"><pre> |
281 | start_link()·-> | 281 | start_link()·-> |
282 | ····gen_server:start_link({local,·ch3},·ch3,·[],·[])·=>·{ok,·Pid}</pre></div> | 282 | ····gen_server:start_link({local,·ch3},·ch3,·[],·[])·=>·{ok,·Pid}</pre></div> |
Offset 330, 15 lines modified | Offset 330, 15 lines modified | ||
330 | ····<p><span·class="code">gen_server:start_link</span>·must·be·used·if·the·gen_server·is | 330 | ····<p><span·class="code">gen_server:start_link</span>·must·be·used·if·the·gen_server·is |
331 | ······part·of·a·supervision·tree,·i.e.·is·started·by·a·supervisor. | 331 | ······part·of·a·supervision·tree,·i.e.·is·started·by·a·supervisor. |
332 | ······There·is·another·function·<span·class="code">gen_server:start</span>·to·start·a | 332 | ······There·is·another·function·<span·class="code">gen_server:start</span>·to·start·a |
333 | ······stand-alone·gen_server,·i.e.·a·gen_server·which·is·not·part·of·a | 333 | ······stand-alone·gen_server,·i.e.·a·gen_server·which·is·not·part·of·a |
334 | ······supervision·tree.</p> | 334 | ······supervision·tree.</p> |
335 | ·· | 335 | ·· |
336 |
··<h3><a·name="idm1 |
336 | ··<h3><a·name="idm140231008776224">2.4 |
337 | ········Synchronous·Requests·-·Call</a></h3> | 337 | ········Synchronous·Requests·-·Call</a></h3> |
338 | ···· | 338 | ···· |
339 | ····<p>The·synchronous·request·<span·class="code">alloc()</span>·is·implemented·using | 339 | ····<p>The·synchronous·request·<span·class="code">alloc()</span>·is·implemented·using |
340 | ······<span·class="code">gen_server:call/2</span>:</p> | 340 | ······<span·class="code">gen_server:call/2</span>:</p> |
341 | ····<div·class="example"><pre> | 341 | ····<div·class="example"><pre> |
342 | alloc()·-> | 342 | alloc()·-> |
343 | ····gen_server:call(ch3,·alloc).</pre></div> | 343 | ····gen_server:call(ch3,·alloc).</pre></div> |
Offset 358, 15 lines modified | Offset 358, 15 lines modified | ||
358 | ······the·new·state·is·the·set·of·remaining·available·channels | 358 | ······the·new·state·is·the·set·of·remaining·available·channels |
359 | ······<span·class="code">Chs2</span>.</p> | 359 | ······<span·class="code">Chs2</span>.</p> |
360 | ····<p>Thus,·the·call·<span·class="code">ch3:alloc()</span>·returns·the·allocated·channel | 360 | ····<p>Thus,·the·call·<span·class="code">ch3:alloc()</span>·returns·the·allocated·channel |
361 | ······<span·class="code">Ch</span>·and·the·gen_server·then·waits·for·new·requests,·now | 361 | ······<span·class="code">Ch</span>·and·the·gen_server·then·waits·for·new·requests,·now |
362 | ······with·an·updated·list·of·available·channels.</p> | 362 | ······with·an·updated·list·of·available·channels.</p> |
363 | ·· | 363 | ·· |
364 |
··<h3><a·name="idm1 |
364 | ··<h3><a·name="idm140231008786432">2.5 |
365 | ········Asynchronous·Requests·-·Cast</a></h3> | 365 | ········Asynchronous·Requests·-·Cast</a></h3> |
366 | ···· | 366 | ···· |
367 | ····<p>The·asynchronous·request·<span·class="code">free(Ch)</span>·is·implemented·using | 367 | ····<p>The·asynchronous·request·<span·class="code">free(Ch)</span>·is·implemented·using |
368 | ······<span·class="code">gen_server:cast/2</span>:</p> | 368 | ······<span·class="code">gen_server:cast/2</span>:</p> |
369 | ····<div·class="example"><pre> | 369 | ····<div·class="example"><pre> |
370 | free(Ch)·-> | 370 | free(Ch)·-> |
371 | ····gen_server:cast(ch3,·{free,·Ch}).</pre></div> | 371 | ····gen_server:cast(ch3,·{free,·Ch}).</pre></div> |
Offset 383, 15 lines modified | Offset 383, 15 lines modified | ||
383 | ····Chs2·=·free(Ch,·Chs), | 383 | ····Chs2·=·free(Ch,·Chs), |
384 | ····{noreply,·Chs2}.</pre></div> | 384 | ····{noreply,·Chs2}.</pre></div> |
385 | ····<p>In·this·case,·the·new·state·is·the·updated·list·of·available | 385 | ····<p>In·this·case,·the·new·state·is·the·updated·list·of·available |
386 | ······channels·<span·class="code">Chs2</span>.·The·gen_server·is·now·ready·for·new | 386 | ······channels·<span·class="code">Chs2</span>.·The·gen_server·is·now·ready·for·new |
387 | ······requests.</p> | 387 | ······requests.</p> |
388 | ·· | 388 | ·· |
389 |
··<h3><a·name="idm1 |
389 | ··<h3><a·name="idm140231009075376">2.6 |
390 | ········Stopping</a></h3> | 390 | ········Stopping</a></h3> |
391 | ···· | 391 | ···· |
392 | ····<h4>In·a·Supervision·Tree</h4> | 392 | ····<h4>In·a·Supervision·Tree</h4> |
393 | ······ | 393 | ······ |
394 | ······<p>If·the·gen_server·is·part·of·a·supervision·tree,·no·stop | 394 | ······<p>If·the·gen_server·is·part·of·a·supervision·tree,·no·stop |
395 | ········function·is·needed.·The·gen_server·will·automatically·be | 395 | ········function·is·needed.·The·gen_server·will·automatically·be |
Offset 443, 15 lines modified | Offset 443, 15 lines modified | ||
443 | ········specifies·that·it·is·a·normal·termination·and·<span·class="code">State1</span>·is | 443 | ········specifies·that·it·is·a·normal·termination·and·<span·class="code">State1</span>·is |
444 | ········a·new·value·for·the·state·of·the·gen_server.·This·will·cause | 444 | ········a·new·value·for·the·state·of·the·gen_server.·This·will·cause |
445 | ········the·gen_server·to·call·<span·class="code">terminate(normal,State1)</span>·and·then | 445 | ········the·gen_server·to·call·<span·class="code">terminate(normal,State1)</span>·and·then |
446 | ········terminate·gracefully.</p> | 446 | ········terminate·gracefully.</p> |
447 | ···· | 447 | ···· |
448 | ·· | 448 | ·· |
449 |
··<h3><a·name="idm1 |
449 | ··<h3><a·name="idm140231008621744">2.7 |
450 | ········Handling·Other·Messages</a></h3> | 450 | ········Handling·Other·Messages</a></h3> |
451 | ···· | 451 | ···· |
452 | ····<p>If·the·gen_server·should·be·able·to·receive·other·messages·than | 452 | ····<p>If·the·gen_server·should·be·able·to·receive·other·messages·than |
453 | ······requests,·the·callback·function·<span·class="code">handle_info(Info,·State)</span> | 453 | ······requests,·the·callback·function·<span·class="code">handle_info(Info,·State)</span> |
454 | ······must·be·implemented·to·handle·them.·Examples·of·other·messages | 454 | ······must·be·implemented·to·handle·them.·Examples·of·other·messages |
455 | ······are·exit·messages,·if·the·gen_server·is·linked·to·other·processes | 455 | ······are·exit·messages,·if·the·gen_server·is·linked·to·other·processes |
456 | ······(than·the·supervisor)·and·trapping·exit·signals.</p> | 456 | ······(than·the·supervisor)·and·trapping·exit·signals.</p> |
Offset 47, 178 lines modified | Offset 47, 178 lines modified | ||
47 | <img·alt="Erlang·logo"·src="../erlang-logo.png"><br><small><a·href="users_guide.html">User's·Guide</a><br><a·href="../pdf/otp-system-documentation-6.3.pdf">PDF</a><br><a·href="../index.html">Top</a></small><p><strong>OTP·Design·Principles</strong><br><strong>User's·Guide</strong><br><small>Version·6.3</small></p> | 47 | <img·alt="Erlang·logo"·src="../erlang-logo.png"><br><small><a·href="users_guide.html">User's·Guide</a><br><a·href="../pdf/otp-system-documentation-6.3.pdf">PDF</a><br><a·href="../index.html">Top</a></small><p><strong>OTP·Design·Principles</strong><br><strong>User's·Guide</strong><br><small>Version·6.3</small></p> |
48 | <br><a·href="javascript:openAllFlips()">Expand·All</a><br><a·href="javascript:closeAllFlips()">Contract·All</a><p><small><strong>Chapters</strong></small></p> | 48 | <br><a·href="javascript:openAllFlips()">Expand·All</a><br><a·href="javascript:closeAllFlips()">Contract·All</a><p><small><strong>Chapters</strong></small></p> |
49 | <ul·class="flipMenu"·imagepath="../js/flipmenu"> | 49 | <ul·class="flipMenu"·imagepath="../js/flipmenu"> |
50 | <li·id="no"·title="Overview"·expanded="false">Overview<ul> | 50 | <li·id="no"·title="Overview"·expanded="false">Overview<ul> |
51 | <li><a·href="des_princ.html"> | 51 | <li><a·href="des_princ.html"> |
52 | ··············Top·of·chapter | 52 | ··············Top·of·chapter |
53 | ············</a></li> | 53 | ············</a></li> |
54 |
<li·title="Supervision·Trees"><a·href="des_princ.html#idm1 |
54 | <li·title="Supervision·Trees"><a·href="des_princ.html#idm140231008664592">Supervision·Trees</a></li> |
55 |
<li·title="Behaviours"><a·href="des_princ.html#idm1 |
55 | <li·title="Behaviours"><a·href="des_princ.html#idm140231008672688">Behaviours</a></li> |
56 |
<li·title="Applications"><a·href="des_princ.html#idm1 |
56 | <li·title="Applications"><a·href="des_princ.html#idm140231008752016">Applications</a></li> |
57 |
<li·title="Releases"><a·href="des_princ.html#idm1 |
57 | <li·title="Releases"><a·href="des_princ.html#idm140231008757072">Releases</a></li> |
58 |
<li·title="Release·Handling"><a·href="des_princ.html#idm1 |
58 | <li·title="Release·Handling"><a·href="des_princ.html#idm140231008760592">Release·Handling</a></li> |
59 | </ul> | 59 | </ul> |
60 | </li> | 60 | </li> |
61 | <li·id="no"·title="Gen_Server·Behaviour"·expanded="false">Gen_Server·Behaviour<ul> | 61 | <li·id="no"·title="Gen_Server·Behaviour"·expanded="false">Gen_Server·Behaviour<ul> |
62 | <li><a·href="gen_server_concepts.html"> | 62 | <li><a·href="gen_server_concepts.html"> |
63 | ··············Top·of·chapter | 63 | ··············Top·of·chapter |
64 | ············</a></li> | 64 | ············</a></li> |
65 |
<li·title="Client-Server·Principles"><a·href="gen_server_concepts.html#idm1 |
65 | <li·title="Client-Server·Principles"><a·href="gen_server_concepts.html#idm140231008770128">Client-Server·Principles</a></li> |
66 |
<li·title="Example"><a·href="gen_server_concepts.html#idm1 |
66 | <li·title="Example"><a·href="gen_server_concepts.html#idm140231008697632">Example</a></li> |
67 |
<li·title="Starting·a·Gen_Server"><a·href="gen_server_concepts.html#idm1 |
67 | <li·title="Starting·a·Gen_Server"><a·href="gen_server_concepts.html#idm140231008702000">Starting·a·Gen_Server</a></li> |
68 |
<li·title="Synchronous·Requests·-·Call"><a·href="gen_server_concepts.html#idm1 |
68 | <li·title="Synchronous·Requests·-·Call"><a·href="gen_server_concepts.html#idm140231008776224">Synchronous·Requests·-·Call</a></li> |
69 |
<li·title="Asynchronous·Requests·-·Cast"><a·href="gen_server_concepts.html#idm1 |
69 | <li·title="Asynchronous·Requests·-·Cast"><a·href="gen_server_concepts.html#idm140231008786432">Asynchronous·Requests·-·Cast</a></li> |
70 |
<li·title="Stopping"><a·href="gen_server_concepts.html#idm1 |
70 | <li·title="Stopping"><a·href="gen_server_concepts.html#idm140231009075376">Stopping</a></li> |
71 |
<li·title="Handling·Other·Messages"><a·href="gen_server_concepts.html#idm1 |
71 | <li·title="Handling·Other·Messages"><a·href="gen_server_concepts.html#idm140231008621744">Handling·Other·Messages</a></li> |
72 | </ul> | 72 | </ul> |
73 | </li> | 73 | </li> |
74 | <li·id="no"·title="Gen_Fsm·Behaviour"·expanded="false">Gen_Fsm·Behaviour<ul> | 74 | <li·id="no"·title="Gen_Fsm·Behaviour"·expanded="false">Gen_Fsm·Behaviour<ul> |
75 | <li><a·href="fsm.html"> | 75 | <li><a·href="fsm.html"> |
76 | ··············Top·of·chapter | 76 | ··············Top·of·chapter |
77 | ············</a></li> | 77 | ············</a></li> |
78 |
<li·title="Finite·State·Machines"><a·href="fsm.html#idm1 |
78 | <li·title="Finite·State·Machines"><a·href="fsm.html#idm140231009090752">Finite·State·Machines</a></li> |
79 |
<li·title="Example"><a·href="fsm.html#idm1 |
79 | <li·title="Example"><a·href="fsm.html#idm140231008799248">Example</a></li> |
80 |
<li·title="Starting·a·Gen_Fsm"><a·href="fsm.html#idm1 |
80 | <li·title="Starting·a·Gen_Fsm"><a·href="fsm.html#idm140231009551600">Starting·a·Gen_Fsm</a></li> |
81 |
<li·title="Notifying·About·Events"><a·href="fsm.html#idm1 |
81 | <li·title="Notifying·About·Events"><a·href="fsm.html#idm140231009115360">Notifying·About·Events</a></li> |
82 |
<li·title="Timeouts"><a·href="fsm.html#idm1 |
82 | <li·title="Timeouts"><a·href="fsm.html#idm140231009808544">Timeouts</a></li> |
83 |
<li·title="All·State·Events"><a·href="fsm.html#idm1 |
83 | <li·title="All·State·Events"><a·href="fsm.html#idm140231009303152">All·State·Events</a></li> |
84 |
<li·title="Stopping"><a·href="fsm.html#idm1 |
84 | <li·title="Stopping"><a·href="fsm.html#idm140231008912976">Stopping</a></li> |
85 |
<li·title="Handling·Other·Messages"><a·href="fsm.html#idm1 |
85 | <li·title="Handling·Other·Messages"><a·href="fsm.html#idm140231008432688">Handling·Other·Messages</a></li> |
86 | </ul> | 86 | </ul> |
87 | </li> | 87 | </li> |
88 | <li·id="no"·title="Gen_Event·Behaviour"·expanded="false">Gen_Event·Behaviour<ul> | 88 | <li·id="no"·title="Gen_Event·Behaviour"·expanded="false">Gen_Event·Behaviour<ul> |
89 | <li><a·href="events.html"> | 89 | <li><a·href="events.html"> |
90 | ··············Top·of·chapter | 90 | ··············Top·of·chapter |
91 | ············</a></li> | 91 | ············</a></li> |
92 |
<li·title="Event·Handling·Principles"><a·href="events.html#idm1 |
92 | <li·title="Event·Handling·Principles"><a·href="events.html#idm140231009179392">Event·Handling·Principles</a></li> |
93 |
<li·title="Example"><a·href="events.html#idm1 |
93 | <li·title="Example"><a·href="events.html#idm140231008417152">Example</a></li> |
94 |
<li·title="Starting·an·Event·Manager"><a·href="events.html#idm1 |
94 | <li·title="Starting·an·Event·Manager"><a·href="events.html#idm140231008413136">Starting·an·Event·Manager</a></li> |
95 |
<li·title="Adding·an·Event·Handler"><a·href="events.html#idm1 |
95 | <li·title="Adding·an·Event·Handler"><a·href="events.html#idm140231009388752">Adding·an·Event·Handler</a></li> |
96 |
<li·title="Notifying·About·Events"><a·href="events.html#idm1 |
96 | <li·title="Notifying·About·Events"><a·href="events.html#idm140231008728512">Notifying·About·Events</a></li> |
97 |
<li·title="Deleting·an·Event·Handler"><a·href="events.html#idm1 |
97 | <li·title="Deleting·an·Event·Handler"><a·href="events.html#idm140231008720736">Deleting·an·Event·Handler</a></li> |
98 |
<li·title="Stopping"><a·href="events.html#idm1 |
98 | <li·title="Stopping"><a·href="events.html#idm140231008689408">Stopping</a></li> |
99 |
<li·title="Handling·Other·Messages"><a·href="events.html#idm1 |
99 | <li·title="Handling·Other·Messages"><a·href="events.html#idm140231008683248">Handling·Other·Messages</a></li> |
100 | </ul> | 100 | </ul> |
101 | </li> | 101 | </li> |
102 | <li·id="no"·title="Supervisor·Behaviour"·expanded="false">Supervisor·Behaviour<ul> | 102 | <li·id="no"·title="Supervisor·Behaviour"·expanded="false">Supervisor·Behaviour<ul> |
103 | <li><a·href="sup_princ.html"> | 103 | <li><a·href="sup_princ.html"> |
104 | ··············Top·of·chapter | 104 | ··············Top·of·chapter |
105 | ············</a></li> | 105 | ············</a></li> |
106 |
<li·title="Supervision·Principles"><a·href="sup_princ.html#idm1 |
106 | <li·title="Supervision·Principles"><a·href="sup_princ.html#idm140231008291744">Supervision·Principles</a></li> |
107 |
<li·title="Example"><a·href="sup_princ.html#idm1 |
107 | <li·title="Example"><a·href="sup_princ.html#idm140231009682528">Example</a></li> |
108 |
<li·title="Restart·Strategy"><a·href="sup_princ.html#idm1 |
108 | <li·title="Restart·Strategy"><a·href="sup_princ.html#idm140231009629632">Restart·Strategy</a></li> |
109 |
<li·title="Maximum·Restart·Frequency"><a·href="sup_princ.html#idm1 |
109 | <li·title="Maximum·Restart·Frequency"><a·href="sup_princ.html#idm140231008896368">Maximum·Restart·Frequency</a></li> |
110 |
<li·title="Child·Specification"><a·href="sup_princ.html#idm1 |
110 | <li·title="Child·Specification"><a·href="sup_princ.html#idm140231008285744">Child·Specification</a></li> |
111 |
<li·title="Starting·a·Supervisor"><a·href="sup_princ.html#idm1 |
111 | <li·title="Starting·a·Supervisor"><a·href="sup_princ.html#idm140231008253328">Starting·a·Supervisor</a></li> |
112 |
<li·title="Adding·a·Child·Process"><a·href="sup_princ.html#idm1 |
112 | <li·title="Adding·a·Child·Process"><a·href="sup_princ.html#idm140231008242208">Adding·a·Child·Process</a></li> |
113 |
<li·title="Stopping·a·Child·Process"><a·href="sup_princ.html#idm1 |
113 | <li·title="Stopping·a·Child·Process"><a·href="sup_princ.html#idm140231008237824">Stopping·a·Child·Process</a></li> |
114 |
<li·title="Simple-One-For-One·Supervisors"><a·href="sup_princ.html#idm1 |
114 | <li·title="Simple-One-For-One·Supervisors"><a·href="sup_princ.html#idm140231008233024">Simple-One-For-One·Supervisors</a></li> |
115 |
<li·title="Stopping"><a·href="sup_princ.html#idm1 |
115 | <li·title="Stopping"><a·href="sup_princ.html#idm140231008218080">Stopping</a></li> |
116 | </ul> | 116 | </ul> |
117 | </li> | 117 | </li> |
118 | <li·id="no"·title="Sys·and·Proc_Lib"·expanded="false">Sys·and·Proc_Lib<ul> | 118 | <li·id="no"·title="Sys·and·Proc_Lib"·expanded="false">Sys·and·Proc_Lib<ul> |
119 | <li><a·href="spec_proc.html"> | 119 | <li><a·href="spec_proc.html"> |
120 | ··············Top·of·chapter | 120 | ··············Top·of·chapter |
121 | ············</a></li> | 121 | ············</a></li> |
122 |
<li·title="Simple·Debugging"><a·href="spec_proc.html#idm1 |
122 | <li·title="Simple·Debugging"><a·href="spec_proc.html#idm140231008206384">Simple·Debugging</a></li> |
123 |
<li·title="Special·Processes"><a·href="spec_proc.html#idm1 |
123 | <li·title="Special·Processes"><a·href="spec_proc.html#idm140231008196256">Special·Processes</a></li> |
124 |
<li·title="User-Defined·Behaviours"><a·href="spec_proc.html#idm1 |
124 | <li·title="User-Defined·Behaviours"><a·href="spec_proc.html#idm140231008119008">User-Defined·Behaviours</a></li> |
125 | </ul> | 125 | </ul> |
126 | </li> | 126 | </li> |
127 | <li·id="no"·title="Applications"·expanded="false">Applications<ul> | 127 | <li·id="no"·title="Applications"·expanded="false">Applications<ul> |
128 | <li><a·href="applications.html"> | 128 | <li><a·href="applications.html"> |
129 | ··············Top·of·chapter | 129 | ··············Top·of·chapter |
130 | ············</a></li> | 130 | ············</a></li> |
131 |
<li·title="Application·Concept"><a·href="applications.html#idm1 |
131 | <li·title="Application·Concept"><a·href="applications.html#idm140231008095264">Application·Concept</a></li> |
132 |
<li·title="Application·Callback·Module"><a·href="applications.html#idm1 |
132 | <li·title="Application·Callback·Module"><a·href="applications.html#idm140231008087216">Application·Callback·Module</a></li> |
133 |
<li·title="Application·Resource·File"><a·href="applications.html#idm1 |
133 | <li·title="Application·Resource·File"><a·href="applications.html#idm140231008073536">Application·Resource·File</a></li> |
134 |
<li·title="Directory·Structure"><a·href="applications.html#idm1 |
134 | <li·title="Directory·Structure"><a·href="applications.html#idm140231008043200">Directory·Structure</a></li> |
135 |
<li·title="Application·Controller"><a·href="applications.html#idm1 |
135 | <li·title="Application·Controller"><a·href="applications.html#idm140231008028064">Application·Controller</a></li> |
136 |
<li·title="Loading·and·Unloading·Applications"><a·href="applications.html#idm1 |
136 | <li·title="Loading·and·Unloading·Applications"><a·href="applications.html#idm140231008024128">Loading·and·Unloading·Applications</a></li> |
137 |
<li·title="Starting·and·Stopping·Applications"><a·href="applications.html#idm1 |
137 | <li·title="Starting·and·Stopping·Applications"><a·href="applications.html#idm140231008016672">Starting·and·Stopping·Applications</a></li> |
138 |
<li·title="Configuring·an·Application"><a·href="applications.html#idm1 |
138 | <li·title="Configuring·an·Application"><a·href="applications.html#idm140231008006160">Configuring·an·Application</a></li> |
139 |
<li·title="Application·Start·Types"><a·href="applications.html#idm1 |
139 | <li·title="Application·Start·Types"><a·href="applications.html#idm140231007982224">Application·Start·Types</a></li> |
140 | </ul> | 140 | </ul> |
141 | </li> | 141 | </li> |
142 | <li·id="loadscrollpos"·title="Included·Applications"·expanded="true">Included·Applications<ul> | 142 | <li·id="loadscrollpos"·title="Included·Applications"·expanded="true">Included·Applications<ul> |
143 | <li><a·href="included_applications.html"> | 143 | <li><a·href="included_applications.html"> |
144 | ··············Top·of·chapter | 144 | ··············Top·of·chapter |
145 | ············</a></li> | 145 | ············</a></li> |
146 |
<li·title="Definition"><a·href="included_applications.html#idm1 |
146 | <li·title="Definition"><a·href="included_applications.html#idm140231007965456">Definition</a></li> |
147 |
<li·title="Specifying·Included·Applications"><a·href="included_applications.html#idm1 |
147 | <li·title="Specifying·Included·Applications"><a·href="included_applications.html#idm140231007957600">Specifying·Included·Applications</a></li> |
148 |
<li·title="Synchronizing·Processes·During·Startup"><a·href="included_applications.html#idm1 |
148 | <li·title="Synchronizing·Processes·During·Startup"><a·href="included_applications.html#idm140231007954560">Synchronizing·Processes·During·Startup</a></li> |
149 | </ul> | 149 | </ul> |
150 | </li> | 150 | </li> |
151 | <li·id="no"·title="Distributed·Applications"·expanded="false">Distributed·Applications<ul> | 151 | <li·id="no"·title="Distributed·Applications"·expanded="false">Distributed·Applications<ul> |
152 | <li><a·href="distributed_applications.html"> | 152 | <li><a·href="distributed_applications.html"> |
153 | ··············Top·of·chapter | 153 | ··············Top·of·chapter |
154 | ············</a></li> | 154 | ············</a></li> |
155 |
<li·title="Definition"><a·href="distributed_applications.html#idm1 |
155 | <li·title="Definition"><a·href="distributed_applications.html#idm140231007928960">Definition</a></li> |
156 |
<li·title="Specifying·Distributed·Applications"><a·href="distributed_applications.html#idm1 |
156 | <li·title="Specifying·Distributed·Applications"><a·href="distributed_applications.html#idm140231007924640">Specifying·Distributed·Applications</a></li> |
157 |
<li·title="Starting·and·Stopping·Distributed·Applications"><a·href="distributed_applications.html#idm1 |
157 | <li·title="Starting·and·Stopping·Distributed·Applications"><a·href="distributed_applications.html#idm140231007899872">Starting·and·Stopping·Distributed·Applications</a></li> |
158 |
<li·title="Failover"><a·href="distributed_applications.html#idm1 |
158 | <li·title="Failover"><a·href="distributed_applications.html#idm140231007887632">Failover</a></li> |
159 |
<li·title="Takeover"><a·href="distributed_applications.html#idm1 |
159 | <li·title="Takeover"><a·href="distributed_applications.html#idm140231007870560">Takeover</a></li> |
160 | </ul> | 160 | </ul> |
161 | </li> | 161 | </li> |
162 | <li·id="no"·title="Releases"·expanded="false">Releases<ul> | 162 | <li·id="no"·title="Releases"·expanded="false">Releases<ul> |
163 | <li><a·href="release_structure.html"> | 163 | <li><a·href="release_structure.html"> |
164 | ··············Top·of·chapter | 164 | ··············Top·of·chapter |
165 | ············</a></li> | 165 | ············</a></li> |
166 |
<li·title="Release·Concept"><a·href="release_structure.html#idm1 |
166 | <li·title="Release·Concept"><a·href="release_structure.html#idm140231007847120">Release·Concept</a></li> |
167 |
<li·title="Release·Resource·File"><a·href="release_structure.html#idm1 |
167 | <li·title="Release·Resource·File"><a·href="release_structure.html#idm140231007840816">Release·Resource·File</a></li> |
168 |
<li·title="Generating·Boot·Scripts"><a·href="release_structure.html#idm1 |
168 | <li·title="Generating·Boot·Scripts"><a·href="release_structure.html#idm140231007823104">Generating·Boot·Scripts</a></li> |
169 |
<li·title="Creating·a·Release·Package"><a·href="release_structure.html#idm1 |
169 | <li·title="Creating·a·Release·Package"><a·href="release_structure.html#idm140231007811840">Creating·a·Release·Package</a></li> |
170 |
<li·title="Directory·Structure"><a·href="release_structure.html#idm1 |
170 | <li·title="Directory·Structure"><a·href="release_structure.html#idm140231007794016">Directory·Structure</a></li> |
171 | </ul> | 171 | </ul> |
172 | </li> | 172 | </li> |
173 | <li·id="no"·title="Release·Handling"·expanded="false">Release·Handling<ul> | 173 | <li·id="no"·title="Release·Handling"·expanded="false">Release·Handling<ul> |
174 | <li><a·href="release_handling.html"> | 174 | <li><a·href="release_handling.html"> |
175 | ··············Top·of·chapter | 175 | ··············Top·of·chapter |
176 | ············</a></li> | 176 | ············</a></li> |
177 |
<li·title="Release·Handling·Principles"><a·href="release_handling.html#idm1 |
177 | <li·title="Release·Handling·Principles"><a·href="release_handling.html#idm140231007763648">Release·Handling·Principles</a></li> |
178 |
<li·title="Requirements"><a·href="release_handling.html#idm1 |
178 | <li·title="Requirements"><a·href="release_handling.html#idm140231007734288">Requirements</a></li> |
179 |
<li·title="Distributed·Systems"><a·href="release_handling.html#idm1 |
179 | <li·title="Distributed·Systems"><a·href="release_handling.html#idm140231007723152">Distributed·Systems</a></li> |
180 |
<li·title="Release·Handling·Instructions"><a·href="release_handling.html#idm1 |
180 | <li·title="Release·Handling·Instructions"><a·href="release_handling.html#idm140231007719984">Release·Handling·Instructions</a></li> |
181 |
<li·title="Application·Upgrade·File"><a·href="release_handling.html#idm1 |
181 | <li·title="Application·Upgrade·File"><a·href="release_handling.html#idm140231007656768">Application·Upgrade·File</a></li> |
182 |
<li·title="Release·Upgrade·File"><a·href="release_handling.html#idm1 |
182 | <li·title="Release·Upgrade·File"><a·href="release_handling.html#idm140231007634928">Release·Upgrade·File</a></li> |
183 |
<li·title="Installing·a·Release"><a·href="release_handling.html#idm1 |
183 | <li·title="Installing·a·Release"><a·href="release_handling.html#idm140231007616192">Installing·a·Release</a></li> |
184 |
<li·title="Updating·Application·Specifications"><a·href="release_handling.html#idm1 |
184 | <li·title="Updating·Application·Specifications"><a·href="release_handling.html#idm140231007559712">Updating·Application·Specifications</a></li> |
185 | </ul> | 185 | </ul> |
186 | </li> | 186 | </li> |
187 | <li·id="no"·title="Appup·Cookbook"·expanded="false">Appup·Cookbook<ul> | 187 | <li·id="no"·title="Appup·Cookbook"·expanded="false">Appup·Cookbook<ul> |
188 | <li><a·href="appup_cookbook.html"> | 188 | <li><a·href="appup_cookbook.html"> |
189 | ··············Top·of·chapter | 189 | ··············Top·of·chapter |
190 | ············</a></li> | 190 | ············</a></li> |
191 |
<li·title="Changing·a·Functional·Module"><a·href="appup_cookbook.html#idm1 |
191 | <li·title="Changing·a·Functional·Module"><a·href="appup_cookbook.html#idm140231007537632">Changing·a·Functional·Module</a></li> |
192 |
<li·title="Changing·a·Residence·Module"><a·href="appup_cookbook.html#idm1 |
192 | <li·title="Changing·a·Residence·Module"><a·href="appup_cookbook.html#idm140231007534896">Changing·a·Residence·Module</a></li> |
193 |
<li·title="Changing·a·Callback·Module"><a·href="appup_cookbook.html#idm1 |
193 | <li·title="Changing·a·Callback·Module"><a·href="appup_cookbook.html#idm140231007530240">Changing·a·Callback·Module</a></li> |
194 |
<li·title="Changing·Internal·State"><a·href="appup_cookbook.html#idm1 |
194 | <li·title="Changing·Internal·State"><a·href="appup_cookbook.html#idm140231007524112">Changing·Internal·State</a></li> |
195 |
<li·title="Module·Dependencies"><a·href="appup_cookbook.html#idm1 |
195 | <li·title="Module·Dependencies"><a·href="appup_cookbook.html#idm140231007507968">Module·Dependencies</a></li> |
196 |
<li·title="Changing·Code·For·a·Special·Process"><a·href="appup_cookbook.html#idm1 |
196 | <li·title="Changing·Code·For·a·Special·Process"><a·href="appup_cookbook.html#idm140231007487488">Changing·Code·For·a·Special·Process</a></li> |
197 |
<li·title="Changing·a·Supervisor"><a·href="appup_cookbook.html#idm1 |
197 | <li·title="Changing·a·Supervisor"><a·href="appup_cookbook.html#idm140231007467472">Changing·a·Supervisor</a></li> |
198 |
<li·title="Adding·or·Deleting·a·Module"><a·href="appup_cookbook.html#idm1 |
198 | <li·title="Adding·or·Deleting·a·Module"><a·href="appup_cookbook.html#idm140231007437968">Adding·or·Deleting·a·Module</a></li> |
199 |
<li·title="Starting·or·Terminating·a·Process"><a·href="appup_cookbook.html#idm1 |
199 | <li·title="Starting·or·Terminating·a·Process"><a·href="appup_cookbook.html#idm140231007434928">Starting·or·Terminating·a·Process</a></li> |
200 |
<li·title="Adding·or·Removing·an·Application"><a·href="appup_cookbook.html#idm1 |
200 | <li·title="Adding·or·Removing·an·Application"><a·href="appup_cookbook.html#idm140231007432704">Adding·or·Removing·an·Application</a></li> |
201 |
<li·title="Restarting·an·Application"><a·href="appup_cookbook.html#idm1 |
201 | <li·title="Restarting·an·Application"><a·href="appup_cookbook.html#idm140231007429024">Restarting·an·Application</a></li> |
202 |
<li·title="Changing·an·Application·Specification"><a·href="appup_cookbook.html#idm1 |
202 | <li·title="Changing·an·Application·Specification"><a·href="appup_cookbook.html#idm140231007423968">Changing·an·Application·Specification</a></li> |
203 |
<li·title="Changing·Application·Configuration"><a·href="appup_cookbook.html#idm1 |
203 | <li·title="Changing·Application·Configuration"><a·href="appup_cookbook.html#idm140231007421104">Changing·Application·Configuration</a></li> |
204 |
<li·title="Changing·Included·Applications"><a·href="appup_cookbook.html#idm1 |
204 | <li·title="Changing·Included·Applications"><a·href="appup_cookbook.html#idm140231007417088">Changing·Included·Applications</a></li> |
205 |
<li·title="Changing·Non-Erlang·Code"><a·href="appup_cookbook.html#idm1 |
205 | <li·title="Changing·Non-Erlang·Code"><a·href="appup_cookbook.html#idm140231007388304">Changing·Non-Erlang·Code</a></li> |
206 |
<li·title="Emulator·Restart·and·Upgrade"><a·href="appup_cookbook.html#idm1 |
206 | <li·title="Emulator·Restart·and·Upgrade"><a·href="appup_cookbook.html#idm140231007378160">Emulator·Restart·and·Upgrade</a></li> |
207 |
<li·title="Emulator·Upgrade·from·pre·OTP·R15"><a·href="appup_cookbook.html#idm1 |
207 | <li·title="Emulator·Upgrade·from·pre·OTP·R15"><a·href="appup_cookbook.html#idm140231007368976">Emulator·Upgrade·from·pre·OTP·R15</a></li> |
208 | </ul> | 208 | </ul> |
209 | </li> | 209 | </li> |
210 | </ul> | 210 | </ul> |
211 | </div></div> | 211 | </div></div> |
212 | <div·id="content"> | 212 | <div·id="content"> |
213 | <div·class="innertube"> | 213 | <div·class="innertube"> |
214 | <h1>8 Included·Applications</h1> | 214 | <h1>8 Included·Applications</h1> |
215 | ·· | 215 | ·· |
216 |
··<h3><a·name="idm1 |
216 | ··<h3><a·name="idm140231007965456">8.1 |
217 | ········Definition</a></h3> | 217 | ········Definition</a></h3> |
218 | ···· | 218 | ···· |
219 | ····<p>An·application·can·<strong>include</strong>·other·applications. | 219 | ····<p>An·application·can·<strong>include</strong>·other·applications. |
220 | ······An·<strong>included·application</strong>·has·its·own·application·directory | 220 | ······An·<strong>included·application</strong>·has·its·own·application·directory |
221 | ······and·<span·class="code">.app</span>·file,·but·it·is·started·as·part·of·the·supervisor | 221 | ······and·<span·class="code">.app</span>·file,·but·it·is·started·as·part·of·the·supervisor |
222 | ······tree·of·another·application.</p> | 222 | ······tree·of·another·application.</p> |
223 | ····<p>An·application·can·only·be·included·by·one·other·application.</p> | 223 | ····<p>An·application·can·only·be·included·by·one·other·application.</p> |
Offset 238, 15 lines modified | Offset 238, 15 lines modified | ||
238 | ······must·be·started·by·a·supervisor·in·the·including·application.</p> | 238 | ······must·be·started·by·a·supervisor·in·the·including·application.</p> |
239 | ····<p>This·means·that·when·running,·an·included·application·is·in·fact | 239 | ····<p>This·means·that·when·running,·an·included·application·is·in·fact |
240 | ······part·of·the·primary·application·and·a·process·in·an·included | 240 | ······part·of·the·primary·application·and·a·process·in·an·included |
241 | ······application·will·consider·itself·belonging·to·the·primary | 241 | ······application·will·consider·itself·belonging·to·the·primary |
242 | ······application.</p> | 242 | ······application.</p> |
243 | ·· | 243 | ·· |
244 |
··<h3><a·name="idm1 |
244 | ··<h3><a·name="idm140231007957600">8.2 |
245 | ········Specifying·Included·Applications</a></h3> | 245 | ········Specifying·Included·Applications</a></h3> |
246 | ···· | 246 | ···· |
247 | ····<p>Which·applications·to·include·is·defined·by | 247 | ····<p>Which·applications·to·include·is·defined·by |
248 | ······the·<span·class="code">included_applications</span>·key·in·the·<span·class="code">.app</span>·file.</p> | 248 | ······the·<span·class="code">included_applications</span>·key·in·the·<span·class="code">.app</span>·file.</p> |
249 | ····<div·class="example"><pre> | 249 | ····<div·class="example"><pre> |
250 | {application,·prim_app, | 250 | {application,·prim_app, |
251 | ·[{description,·"Tree·application"}, | 251 | ·[{description,·"Tree·application"}, |
Offset 256, 15 lines modified | Offset 256, 15 lines modified | ||
256 | ··{included_applications,·[incl_app]}, | 256 | ··{included_applications,·[incl_app]}, |
257 | ··{applications,·[kernel,·stdlib,·sasl]}, | 257 | ··{applications,·[kernel,·stdlib,·sasl]}, |
258 | ··{mod,·{prim_app_cb,[]}}, | 258 | ··{mod,·{prim_app_cb,[]}}, |
259 | ··{env,·[{file,·"/usr/local/log"}]} | 259 | ··{env,·[{file,·"/usr/local/log"}]} |
260 | ·]}.</pre></div> | 260 | ·]}.</pre></div> |
261 | ·· | 261 | ·· |
262 |
··<h3><a·name="idm1 |
262 | ··<h3><a·name="idm140231007954560">8.3 |
263 | ········Synchronizing·Processes·During·Startup</a></h3> | 263 | ········Synchronizing·Processes·During·Startup</a></h3> |
264 | ···· | 264 | ···· |
265 | ····<p>The·supervisor·tree·of·an·included·application·is·started·as | 265 | ····<p>The·supervisor·tree·of·an·included·application·is·started·as |
266 | ······part·of·the·supervisor·tree·of·the·including·application. | 266 | ······part·of·the·supervisor·tree·of·the·including·application. |
267 | ······If·there·is·a·need·for·synchronization·between·processes·in | 267 | ······If·there·is·a·need·for·synchronization·between·processes·in |
268 | ······the·including·and·included·applications,·this·can·be·achieved | 268 | ······the·including·and·included·applications,·this·can·be·achieved |
269 | ······by·using·<strong>start·phases</strong>.</p> | 269 | ······by·using·<strong>start·phases</strong>.</p> |
Offset 47, 178 lines modified | Offset 47, 178 lines modified | ||
47 | <img·alt="Erlang·logo"·src="../erlang-logo.png"><br><small><a·href="users_guide.html">User's·Guide</a><br><a·href="../pdf/otp-system-documentation-6.3.pdf">PDF</a><br><a·href="../index.html">Top</a></small><p><strong>OTP·Design·Principles</strong><br><strong>User's·Guide</strong><br><small>Version·6.3</small></p> | 47 | <img·alt="Erlang·logo"·src="../erlang-logo.png"><br><small><a·href="users_guide.html">User's·Guide</a><br><a·href="../pdf/otp-system-documentation-6.3.pdf">PDF</a><br><a·href="../index.html">Top</a></small><p><strong>OTP·Design·Principles</strong><br><strong>User's·Guide</strong><br><small>Version·6.3</small></p> |
48 | <br><a·href="javascript:openAllFlips()">Expand·All</a><br><a·href="javascript:closeAllFlips()">Contract·All</a><p><small><strong>Chapters</strong></small></p> | 48 | <br><a·href="javascript:openAllFlips()">Expand·All</a><br><a·href="javascript:closeAllFlips()">Contract·All</a><p><small><strong>Chapters</strong></small></p> |
49 | <ul·class="flipMenu"·imagepath="../js/flipmenu"> | 49 | <ul·class="flipMenu"·imagepath="../js/flipmenu"> |
50 | <li·id="no"·title="Overview"·expanded="false">Overview<ul> | 50 | <li·id="no"·title="Overview"·expanded="false">Overview<ul> |
51 | <li><a·href="des_princ.html"> | 51 | <li><a·href="des_princ.html"> |
52 | ··············Top·of·chapter | 52 | ··············Top·of·chapter |
53 | ············</a></li> | 53 | ············</a></li> |
54 |
<li·title="Supervision·Trees"><a·href="des_princ.html#idm1 |
54 | <li·title="Supervision·Trees"><a·href="des_princ.html#idm140231008664592">Supervision·Trees</a></li> |
55 |
<li·title="Behaviours"><a·href="des_princ.html#idm1 |
55 | <li·title="Behaviours"><a·href="des_princ.html#idm140231008672688">Behaviours</a></li> |
56 |
<li·title="Applications"><a·href="des_princ.html#idm1 |
56 | <li·title="Applications"><a·href="des_princ.html#idm140231008752016">Applications</a></li> |
57 |
<li·title="Releases"><a·href="des_princ.html#idm1 |
57 | <li·title="Releases"><a·href="des_princ.html#idm140231008757072">Releases</a></li> |
58 |
<li·title="Release·Handling"><a·href="des_princ.html#idm1 |
58 | <li·title="Release·Handling"><a·href="des_princ.html#idm140231008760592">Release·Handling</a></li> |
59 | </ul> | 59 | </ul> |
60 | </li> | 60 | </li> |
61 | <li·id="no"·title="Gen_Server·Behaviour"·expanded="false">Gen_Server·Behaviour<ul> | 61 | <li·id="no"·title="Gen_Server·Behaviour"·expanded="false">Gen_Server·Behaviour<ul> |
62 | <li><a·href="gen_server_concepts.html"> | 62 | <li><a·href="gen_server_concepts.html"> |
63 | ··············Top·of·chapter | 63 | ··············Top·of·chapter |
64 | ············</a></li> | 64 | ············</a></li> |
65 |
<li·title="Client-Server·Principles"><a·href="gen_server_concepts.html#idm1 |
65 | <li·title="Client-Server·Principles"><a·href="gen_server_concepts.html#idm140231008770128">Client-Server·Principles</a></li> |
66 |
<li·title="Example"><a·href="gen_server_concepts.html#idm1 |
66 | <li·title="Example"><a·href="gen_server_concepts.html#idm140231008697632">Example</a></li> |
67 |
<li·title="Starting·a·Gen_Server"><a·href="gen_server_concepts.html#idm1 |
67 | <li·title="Starting·a·Gen_Server"><a·href="gen_server_concepts.html#idm140231008702000">Starting·a·Gen_Server</a></li> |
68 |
<li·title="Synchronous·Requests·-·Call"><a·href="gen_server_concepts.html#idm1 |
68 | <li·title="Synchronous·Requests·-·Call"><a·href="gen_server_concepts.html#idm140231008776224">Synchronous·Requests·-·Call</a></li> |
69 |
<li·title="Asynchronous·Requests·-·Cast"><a·href="gen_server_concepts.html#idm1 |
69 | <li·title="Asynchronous·Requests·-·Cast"><a·href="gen_server_concepts.html#idm140231008786432">Asynchronous·Requests·-·Cast</a></li> |
70 |
<li·title="Stopping"><a·href="gen_server_concepts.html#idm1 |
70 | <li·title="Stopping"><a·href="gen_server_concepts.html#idm140231009075376">Stopping</a></li> |
71 |
<li·title="Handling·Other·Messages"><a·href="gen_server_concepts.html#idm1 |
71 | <li·title="Handling·Other·Messages"><a·href="gen_server_concepts.html#idm140231008621744">Handling·Other·Messages</a></li> |
72 | </ul> | 72 | </ul> |
73 | </li> | 73 | </li> |
74 | <li·id="no"·title="Gen_Fsm·Behaviour"·expanded="false">Gen_Fsm·Behaviour<ul> | 74 | <li·id="no"·title="Gen_Fsm·Behaviour"·expanded="false">Gen_Fsm·Behaviour<ul> |
75 | <li><a·href="fsm.html"> | 75 | <li><a·href="fsm.html"> |
76 | ··············Top·of·chapter | 76 | ··············Top·of·chapter |
77 | ············</a></li> | 77 | ············</a></li> |
78 |
<li·title="Finite·State·Machines"><a·href="fsm.html#idm1 |
78 | <li·title="Finite·State·Machines"><a·href="fsm.html#idm140231009090752">Finite·State·Machines</a></li> |
79 |
<li·title="Example"><a·href="fsm.html#idm1 |
79 | <li·title="Example"><a·href="fsm.html#idm140231008799248">Example</a></li> |
80 |
<li·title="Starting·a·Gen_Fsm"><a·href="fsm.html#idm1 |
80 | <li·title="Starting·a·Gen_Fsm"><a·href="fsm.html#idm140231009551600">Starting·a·Gen_Fsm</a></li> |
81 |
<li·title="Notifying·About·Events"><a·href="fsm.html#idm1 |
81 | <li·title="Notifying·About·Events"><a·href="fsm.html#idm140231009115360">Notifying·About·Events</a></li> |
82 |
<li·title="Timeouts"><a·href="fsm.html#idm1 |
82 | <li·title="Timeouts"><a·href="fsm.html#idm140231009808544">Timeouts</a></li> |
83 |
<li·title="All·State·Events"><a·href="fsm.html#idm1 |
83 | <li·title="All·State·Events"><a·href="fsm.html#idm140231009303152">All·State·Events</a></li> |
84 |
<li·title="Stopping"><a·href="fsm.html#idm1 |
84 | <li·title="Stopping"><a·href="fsm.html#idm140231008912976">Stopping</a></li> |
85 |
<li·title="Handling·Other·Messages"><a·href="fsm.html#idm1 |
85 | <li·title="Handling·Other·Messages"><a·href="fsm.html#idm140231008432688">Handling·Other·Messages</a></li> |
86 | </ul> | 86 | </ul> |
87 | </li> | 87 | </li> |
88 | <li·id="no"·title="Gen_Event·Behaviour"·expanded="false">Gen_Event·Behaviour<ul> | 88 | <li·id="no"·title="Gen_Event·Behaviour"·expanded="false">Gen_Event·Behaviour<ul> |
89 | <li><a·href="events.html"> | 89 | <li><a·href="events.html"> |
90 | ··············Top·of·chapter | 90 | ··············Top·of·chapter |
91 | ············</a></li> | 91 | ············</a></li> |
92 |
<li·title="Event·Handling·Principles"><a·href="events.html#idm1 |
92 | <li·title="Event·Handling·Principles"><a·href="events.html#idm140231009179392">Event·Handling·Principles</a></li> |
93 |
<li·title="Example"><a·href="events.html#idm1 |
93 | <li·title="Example"><a·href="events.html#idm140231008417152">Example</a></li> |
94 |
<li·title="Starting·an·Event·Manager"><a·href="events.html#idm1 |
94 | <li·title="Starting·an·Event·Manager"><a·href="events.html#idm140231008413136">Starting·an·Event·Manager</a></li> |
95 |
<li·title="Adding·an·Event·Handler"><a·href="events.html#idm1 |
95 | <li·title="Adding·an·Event·Handler"><a·href="events.html#idm140231009388752">Adding·an·Event·Handler</a></li> |
96 |
<li·title="Notifying·About·Events"><a·href="events.html#idm1 |
96 | <li·title="Notifying·About·Events"><a·href="events.html#idm140231008728512">Notifying·About·Events</a></li> |
97 |
<li·title="Deleting·an·Event·Handler"><a·href="events.html#idm1 |
97 | <li·title="Deleting·an·Event·Handler"><a·href="events.html#idm140231008720736">Deleting·an·Event·Handler</a></li> |
98 |
<li·title="Stopping"><a·href="events.html#idm1 |
98 | <li·title="Stopping"><a·href="events.html#idm140231008689408">Stopping</a></li> |
99 |
<li·title="Handling·Other·Messages"><a·href="events.html#idm1 |
99 | <li·title="Handling·Other·Messages"><a·href="events.html#idm140231008683248">Handling·Other·Messages</a></li> |
100 | </ul> | 100 | </ul> |
101 | </li> | 101 | </li> |
102 | <li·id="no"·title="Supervisor·Behaviour"·expanded="false">Supervisor·Behaviour<ul> | 102 | <li·id="no"·title="Supervisor·Behaviour"·expanded="false">Supervisor·Behaviour<ul> |
103 | <li><a·href="sup_princ.html"> | 103 | <li><a·href="sup_princ.html"> |
104 | ··············Top·of·chapter | 104 | ··············Top·of·chapter |
105 | ············</a></li> | 105 | ············</a></li> |
106 |
<li·title="Supervision·Principles"><a·href="sup_princ.html#idm1 |
106 | <li·title="Supervision·Principles"><a·href="sup_princ.html#idm140231008291744">Supervision·Principles</a></li> |
107 |
<li·title="Example"><a·href="sup_princ.html#idm1 |
107 | <li·title="Example"><a·href="sup_princ.html#idm140231009682528">Example</a></li> |
108 |
<li·title="Restart·Strategy"><a·href="sup_princ.html#idm1 |
108 | <li·title="Restart·Strategy"><a·href="sup_princ.html#idm140231009629632">Restart·Strategy</a></li> |
109 |
<li·title="Maximum·Restart·Frequency"><a·href="sup_princ.html#idm1 |
109 | <li·title="Maximum·Restart·Frequency"><a·href="sup_princ.html#idm140231008896368">Maximum·Restart·Frequency</a></li> |
110 |
<li·title="Child·Specification"><a·href="sup_princ.html#idm1 |
110 | <li·title="Child·Specification"><a·href="sup_princ.html#idm140231008285744">Child·Specification</a></li> |
111 |
<li·title="Starting·a·Supervisor"><a·href="sup_princ.html#idm1 |
111 | <li·title="Starting·a·Supervisor"><a·href="sup_princ.html#idm140231008253328">Starting·a·Supervisor</a></li> |
112 |
<li·title="Adding·a·Child·Process"><a·href="sup_princ.html#idm1 |
112 | <li·title="Adding·a·Child·Process"><a·href="sup_princ.html#idm140231008242208">Adding·a·Child·Process</a></li> |
113 |
<li·title="Stopping·a·Child·Process"><a·href="sup_princ.html#idm1 |
113 | <li·title="Stopping·a·Child·Process"><a·href="sup_princ.html#idm140231008237824">Stopping·a·Child·Process</a></li> |
114 |
<li·title="Simple-One-For-One·Supervisors"><a·href="sup_princ.html#idm1 |
114 | <li·title="Simple-One-For-One·Supervisors"><a·href="sup_princ.html#idm140231008233024">Simple-One-For-One·Supervisors</a></li> |
115 |
<li·title="Stopping"><a·href="sup_princ.html#idm1 |
115 | <li·title="Stopping"><a·href="sup_princ.html#idm140231008218080">Stopping</a></li> |
116 | </ul> | 116 | </ul> |
117 | </li> | 117 | </li> |
118 | <li·id="no"·title="Sys·and·Proc_Lib"·expanded="false">Sys·and·Proc_Lib<ul> | 118 | <li·id="no"·title="Sys·and·Proc_Lib"·expanded="false">Sys·and·Proc_Lib<ul> |
119 | <li><a·href="spec_proc.html"> | 119 | <li><a·href="spec_proc.html"> |
120 | ··············Top·of·chapter | 120 | ··············Top·of·chapter |
121 | ············</a></li> | 121 | ············</a></li> |
122 |
<li·title="Simple·Debugging"><a·href="spec_proc.html#idm1 |
122 | <li·title="Simple·Debugging"><a·href="spec_proc.html#idm140231008206384">Simple·Debugging</a></li> |
123 |
<li·title="Special·Processes"><a·href="spec_proc.html#idm1 |
123 | <li·title="Special·Processes"><a·href="spec_proc.html#idm140231008196256">Special·Processes</a></li> |
124 |
<li·title="User-Defined·Behaviours"><a·href="spec_proc.html#idm1 |
124 | <li·title="User-Defined·Behaviours"><a·href="spec_proc.html#idm140231008119008">User-Defined·Behaviours</a></li> |
125 | </ul> | 125 | </ul> |
126 | </li> | 126 | </li> |
127 | <li·id="no"·title="Applications"·expanded="false">Applications<ul> | 127 | <li·id="no"·title="Applications"·expanded="false">Applications<ul> |
128 | <li><a·href="applications.html"> | 128 | <li><a·href="applications.html"> |
129 | ··············Top·of·chapter | 129 | ··············Top·of·chapter |
130 | ············</a></li> | 130 | ············</a></li> |
131 |
<li·title="Application·Concept"><a·href="applications.html#idm1 |
131 | <li·title="Application·Concept"><a·href="applications.html#idm140231008095264">Application·Concept</a></li> |
132 |
<li·title="Application·Callback·Module"><a·href="applications.html#idm1 |
132 | <li·title="Application·Callback·Module"><a·href="applications.html#idm140231008087216">Application·Callback·Module</a></li> |
133 |
<li·title="Application·Resource·File"><a·href="applications.html#idm1 |
133 | <li·title="Application·Resource·File"><a·href="applications.html#idm140231008073536">Application·Resource·File</a></li> |
134 |
<li·title="Directory·Structure"><a·href="applications.html#idm1 |
134 | <li·title="Directory·Structure"><a·href="applications.html#idm140231008043200">Directory·Structure</a></li> |
135 |
<li·title="Application·Controller"><a·href="applications.html#idm1 |
135 | <li·title="Application·Controller"><a·href="applications.html#idm140231008028064">Application·Controller</a></li> |
136 |
<li·title="Loading·and·Unloading·Applications"><a·href="applications.html#idm1 |
136 | <li·title="Loading·and·Unloading·Applications"><a·href="applications.html#idm140231008024128">Loading·and·Unloading·Applications</a></li> |
137 |
<li·title="Starting·and·Stopping·Applications"><a·href="applications.html#idm1 |
137 | <li·title="Starting·and·Stopping·Applications"><a·href="applications.html#idm140231008016672">Starting·and·Stopping·Applications</a></li> |
138 |
<li·title="Configuring·an·Application"><a·href="applications.html#idm1 |
138 | <li·title="Configuring·an·Application"><a·href="applications.html#idm140231008006160">Configuring·an·Application</a></li> |
139 |
<li·title="Application·Start·Types"><a·href="applications.html#idm1 |
139 | <li·title="Application·Start·Types"><a·href="applications.html#idm140231007982224">Application·Start·Types</a></li> |
140 | </ul> | 140 | </ul> |
141 | </li> | 141 | </li> |
142 | <li·id="no"·title="Included·Applications"·expanded="false">Included·Applications<ul> | 142 | <li·id="no"·title="Included·Applications"·expanded="false">Included·Applications<ul> |
143 | <li><a·href="included_applications.html"> | 143 | <li><a·href="included_applications.html"> |
144 | ··············Top·of·chapter | 144 | ··············Top·of·chapter |
145 | ············</a></li> | 145 | ············</a></li> |
146 |
<li·title="Definition"><a·href="included_applications.html#idm1 |
146 | <li·title="Definition"><a·href="included_applications.html#idm140231007965456">Definition</a></li> |
147 |
<li·title="Specifying·Included·Applications"><a·href="included_applications.html#idm1 |
147 | <li·title="Specifying·Included·Applications"><a·href="included_applications.html#idm140231007957600">Specifying·Included·Applications</a></li> |
148 |
<li·title="Synchronizing·Processes·During·Startup"><a·href="included_applications.html#idm1 |
148 | <li·title="Synchronizing·Processes·During·Startup"><a·href="included_applications.html#idm140231007954560">Synchronizing·Processes·During·Startup</a></li> |
149 | </ul> | 149 | </ul> |
150 | </li> | 150 | </li> |
151 | <li·id="no"·title="Distributed·Applications"·expanded="false">Distributed·Applications<ul> | 151 | <li·id="no"·title="Distributed·Applications"·expanded="false">Distributed·Applications<ul> |
152 | <li><a·href="distributed_applications.html"> | 152 | <li><a·href="distributed_applications.html"> |
153 | ··············Top·of·chapter | 153 | ··············Top·of·chapter |
154 | ············</a></li> | 154 | ············</a></li> |
155 |
<li·title="Definition"><a·href="distributed_applications.html#idm1 |
155 | <li·title="Definition"><a·href="distributed_applications.html#idm140231007928960">Definition</a></li> |
156 |
<li·title="Specifying·Distributed·Applications"><a·href="distributed_applications.html#idm1 |
156 | <li·title="Specifying·Distributed·Applications"><a·href="distributed_applications.html#idm140231007924640">Specifying·Distributed·Applications</a></li> |
157 |
<li·title="Starting·and·Stopping·Distributed·Applications"><a·href="distributed_applications.html#idm1 |
157 | <li·title="Starting·and·Stopping·Distributed·Applications"><a·href="distributed_applications.html#idm140231007899872">Starting·and·Stopping·Distributed·Applications</a></li> |
158 |
<li·title="Failover"><a·href="distributed_applications.html#idm1 |
158 | <li·title="Failover"><a·href="distributed_applications.html#idm140231007887632">Failover</a></li> |
159 |
<li·title="Takeover"><a·href="distributed_applications.html#idm1 |
159 | <li·title="Takeover"><a·href="distributed_applications.html#idm140231007870560">Takeover</a></li> |
160 | </ul> | 160 | </ul> |
161 | </li> | 161 | </li> |
162 | <li·id="no"·title="Releases"·expanded="false">Releases<ul> | 162 | <li·id="no"·title="Releases"·expanded="false">Releases<ul> |
163 | <li><a·href="release_structure.html"> | 163 | <li><a·href="release_structure.html"> |
164 | ··············Top·of·chapter | 164 | ··············Top·of·chapter |
165 | ············</a></li> | 165 | ············</a></li> |
166 |
<li·title="Release·Concept"><a·href="release_structure.html#idm1 |
166 | <li·title="Release·Concept"><a·href="release_structure.html#idm140231007847120">Release·Concept</a></li> |
167 |
<li·title="Release·Resource·File"><a·href="release_structure.html#idm1 |
167 | <li·title="Release·Resource·File"><a·href="release_structure.html#idm140231007840816">Release·Resource·File</a></li> |
168 |
<li·title="Generating·Boot·Scripts"><a·href="release_structure.html#idm1 |
168 | <li·title="Generating·Boot·Scripts"><a·href="release_structure.html#idm140231007823104">Generating·Boot·Scripts</a></li> |
169 |
<li·title="Creating·a·Release·Package"><a·href="release_structure.html#idm1 |
169 | <li·title="Creating·a·Release·Package"><a·href="release_structure.html#idm140231007811840">Creating·a·Release·Package</a></li> |
170 |
<li·title="Directory·Structure"><a·href="release_structure.html#idm1 |
170 | <li·title="Directory·Structure"><a·href="release_structure.html#idm140231007794016">Directory·Structure</a></li> |
171 | </ul> | 171 | </ul> |
172 | </li> | 172 | </li> |
173 | <li·id="loadscrollpos"·title="Release·Handling"·expanded="true">Release·Handling<ul> | 173 | <li·id="loadscrollpos"·title="Release·Handling"·expanded="true">Release·Handling<ul> |
174 | <li><a·href="release_handling.html"> | 174 | <li><a·href="release_handling.html"> |
175 | ··············Top·of·chapter | 175 | ··············Top·of·chapter |
176 |