create or delete the mqueue manager from source code?

Hi Community

Does it gives a possibility to start or to delete the POSIX message queu manager, inside a source code and not in the shell with mqueue & ???

Thank You

Look at exec*() and system()

Thank You mario

Great this is a good idea.
I can start the message queu manager with system() like this example

rc = system( “ls” );
if( rc == -1 ) {
printf( “shell could not be run\n” );
but how to kill the mqueue Process after his work is done??
Thank you

system( “slay mqueue” ); ?

Ok I’ve try it

Thank You

Yes this works great !!!

but threre are twice queues to delete,
how can I kill the right Queue without shell message:

slay: sbin/mqueue 573474 on (tty not known) (y/N)?N
slay: sbin/mqueue 12292 on (tty not known) (y/N)?N

Thank you

try slay -f sbin/mqueue