Hello,
What i want to do is that I want to use an applicaton to start another application. For example, I have two application, named applicaton A and application B. I just want to use application A to start application B, what can i do?
there are several ways to do that. You could start B as a child process of A. Alternatively, you could use the "Loader" service to let A start B. A would be the client of the loader and B would then be a child process of the loader. You can find an example for using both techniques at 'os/src/test/failsafe'. There is also a ready-to-use run script at 'os/run/failsafe.run'.
From the source code of genode, I know the init('os/src/init/main.cc') start all the application in the config file. After starting all the applications, the init process waits for the sign of the config file changed. Can i change the config file dynamically to make one applicaton to start another applicaton? For example, First, I use a the config file with only application A. so that the init process can start the application A. After the init process starts all the applications in the config file, application A changes the config file to make the config file contains with the applicaton B, then the init process gets the signal of config file changed, and start application B?
Init is indeed capable to respond to configuration changes. The first instance of init (started directly by core) is meant to have a static configuration. But you can spawn futher instances of init and supply their respective configurations dynamically. To explore the mechanism for suppling dynamic configurations to processes, you might find the examples at 'os/src/dynamic_config/' useful. There are the following run scripts available for experimentation, located at 'os/run':
'dynamic_config.run': A program obtains its config from a ROM service that updates the configuration at runtime.
'dynamic_config_slave.run': Program A starts program B as a child process and pushes configuration updates to B. B responds to those updates.
'dynamic_config_loader.run': Program A starts program B via the loader and supplies configuration updates via the loader session.
Regards Norman