Stopping a resource manager

I would like to start and stop resource managers on the fly from my program.
I have had no problem starting them with spawnv() but I cannot think of a
good way of stopping them.

system (“slay device”) works but is surely not the preferred way of doing
it. Is there a better/standard method?

\

Paul.

Paul Jones <paul.jones@bnc.ox.ac.uk> wrote:

I would like to start and stop resource managers on the fly from my program.
I have had no problem starting them with spawnv() but I cannot think of a
good way of stopping them.

system (“slay device”) works but is surely not the preferred way of doing
it. Is there a better/standard method?

As always, “it depends”.

You could simply “kill()” them, once you’ve found the pid.
Or you could send it a devctl() message saying “please die”.
Or you could issue a “umount” and unmount it, effectively asking it to die.

Cheers,
-RK


Robert Krten, PARSE Software Devices +1 613 599 8316.
Realtime Systems Architecture, Books, Video-based and Instructor-led
Training and Consulting at www.parse.com.
Email my initials at parse dot com.