how to create processes and run them automaitcally when OS

I’m a fresh man in qnx and i’m dying to get help from all of you.
I’m developping a system in which I have to create some processes and their children,and make them run automatically when os is started.I have no ideal about it. I really need help.If is ok ,i hope i can get some small example programes about create processes.My e-mail is songlong13@163.com. Thank you in advance.
best regards.

Some useful functions:

spawn(), exec(), fork(), exit(), kill(), raise() - search at the QNX-Momentic-Help for more information.

Hope this ist a start for you.
Do you want to start your application automatically if QNX is startup - to do that there are many ways:

a) in the last line of your IFS you can add: sh -c
b) or you can put the line -at last - in /root/.profiles (if you run as root /home//.profiles if you run as a user)
c) you can use the rc.sysinit …

thank you for everything!!You have kindly did me a big favour.

You might also want to look at the Controlling How Neutrino Starts chapter of the Neutrino User’s Guide. It should be in the documentation installed with the OS. It’s also available on the QNX website (and as a printed book).