aboutsummaryrefslogtreecommitdiffstats
path: root/lib/test_server/prebuild.skip
diff options
context:
space:
mode:
authorFred Hebert <[email protected]>2013-06-20 13:56:56 -0400
committerFred Hebert <[email protected]>2013-07-11 10:15:05 -0400
commit45a8f39ef1ade82a379b8a94ff3378d0b149bd96 (patch)
tree42455b8020ad0761a921e7cc60d79ccc5fb8de4e /lib/test_server/prebuild.skip
parent15874f5848bb4686b1ab1986adc2e8c366492a4d (diff)
downloadotp-45a8f39ef1ade82a379b8a94ff3378d0b149bd96.tar.gz
otp-45a8f39ef1ade82a379b8a94ff3378d0b149bd96.tar.bz2
otp-45a8f39ef1ade82a379b8a94ff3378d0b149bd96.zip
Add application:ensure_all_started/1-2
This adds two new functions to the application module that will recursively look for missing dependencies to start the entire dependency chain of a given application, and then the application itself, if possible. Its entire behavior is based on the currently existing 'start/1-2' functions, which will report dependencies that have not yet been started and other problems encountered. 'ensure_all_started/1-2' will use this information the way any programmer would manually do it to automate the process. This kind of functionality, while not OTP-ish (releases do this start sequence for the user), is still useful for testing purposes, quick demonstrations, and programmers who do not wish or know how to use OTP releases. The function returns '{ok, StartedApps}' for all started or already started applications (already started are omitted from the list), and will return '{error, {AppName, Reason}}' on a failure to allow users to rapidly know why the function failed. Note that no specific check is made for direct or indirect circular dependencies between applications, and these will make the function go in an infinite loop.
Diffstat (limited to 'lib/test_server/prebuild.skip')
0 files changed, 0 insertions, 0 deletions