Restarting mm-detect manually

An application can restart mm-detect with an explicit command if mm-detect has unexpectedly stopped and if the application can't proceed without automated media detection and synchronization.

The exact conditions that require an application to restart mm-detect are:

To restart mm-detect manually, your application must:
  1. Confirm that mm-detect isn't already running by checking the list of active processes with the pidin or ps command.
  2. Confirm that both the qdb and mm-sync processes are already running by checking the same list of active processes.
    The mm-detect process depends on both these other services, so if either one is not running, that service must be started; otherwise, mm-detect won't do anything when it runs.
  3. Send the command line for running mm-detect with the desired command options to the OS, using the system() or spawn() system call.

    For details on the system calls that send commands to the OS, see the C Library Reference. For the full list of command-line options, see the mm-detect command line section.

The OS tries to run mm-detect and reports the operation outcome to sloginfo. If sloginfo shows no error, mm-detect is now running.
Note: Your system should run only one instance of mm-detect, so applications relying on the service must coordinate with each other to avoid starting mm-detect multiple times.