How to have task return to the shell before completion

How do I write my process so that it will return to the shell instead of
waiting until it terminates?
I know doing “myprocess &” does this, but can I make my resouce manager do
this automatically?

Take a look at procmgr_daemon in the helpviewer. THis
should do what you need.

-Peter


Chris Rose <chris.rose@viasat.com> wrote:

How do I write my process so that it will return to the shell instead of
waiting until it terminates?
I know doing “myprocess &” does this, but can I make my resouce manager do
this automatically?

Peter Graves <pgraves@qnx.com> wrote in news:a4emsc$kvq$1@nntp.qnx.com:

Take a look at procmgr_daemon in the helpviewer. THis
should do what you need.

-Peter


Chris Rose <> chris.rose@viasat.com> > wrote:
How do I write my process so that it will return to the shell instead
of waiting until it terminates?
I know doing “myprocess &” does this, but can I make my resouce
manager do this automatically?

Or if you wish to do the non-QNX way - you could do a fork(), setsid(),
fork(). Mind you, you’ll need to take care of where stdin/out/err go and
you’ll have to ensure that the forks occur before any threading calls are
made (right at the start of your app).

The advantage to procmgr_daemon is that you’ll keep the same PID number
after the call.


\

Cheers,
Adam

QNX Software Systems Ltd.
[ amallory@qnx.com ]

With a PC, I always felt limited by the software available.
On Unix, I am limited only by my knowledge.
–Peter J. Schoenster <pschon@baste.magibox.net>