|
I haven't worked with embedded systems, I can only venture a guess as to why the While statement is needed.
I think that the startQT program above probably starts a separate process. If the current process ends, for some reason it will take out the one started from startQT (this is just a guess). The above statements can be translated into:
Start the "startQT" thread
whenever {true} is true,
do the following:
do nothing for 1000d, let other process run
go back to whenever.
I'm finished.
Note that the "exit" command is never reached. It is an intentional infinite loop. the script checks to see if 1 is still true, and if it is it will do nothing for "1000d". Then it will check to see if 1 is still true, which it will always be.
by the way, your title should say: "Why do I need a while loop in /etc/init.d/rcS in embedded linux to start QT", or "Why is a while loop needed in..."
While means "as long as". It is the opposite of "until".
|