Starting a process from Phab

Hi all,

How do I start a resource manager within a Photon application. Is it with
exec() or with spawn().

Thanks in advance.

Freddy.

exec() would cause the resource manager code to replace the Photon
application, effectively killing the Photon application.

spawn() would start the resource manager and as soon as it succeeds
in doing so, spawn() would return. Both the resource manager
and the Photon application would now be running.

So spawn() is probably what you want. There is also the simpler
spawn*() family of functions. Effectively:

spawn*(P_NOWAIT, …) is like spawn()
spawn*(P_OVERLAY, …) is like exec()

fmartens-2000 <fmartens-2000@planet.nl> wrote:

Hi all,

How do I start a resource manager within a Photon application. Is it with
exec() or with spawn().

Thanks in advance.

Freddy.