Command line for cdpub

Start cdpub device publisher


cdpub [-b] -f raw_device[:cam] [-l] [-m pps_path] [-n iterations]
      [-p insertion:removal] [-r scope:init] [-s dll_path] [-v]


Run cdpub in the foreground (not background). This option is handy for debugging because you can press CtrlC to terminate the publisher.
By default, cdpub runs in the background.
-f raw_device[:cam]
Device path of the CD drive to monitor for state changes. You can name only one device, with or without its device name and unit number: /dev/cd0 or /dev/cd0:/dev/cam0/000.
The CD driver creates the /dev/cam0/000 entry, which gives cdpub another device path for issuing commands (e.g., eject, load) when the /dev/cd0 path is busy (perhaps due to a filesystem operation).
Note: This flag and one of the two listed device paths must be specified once on the command line; cdpub ignores extra -f options.
Log messages to slog2info instead of standard out.
By default, cdpub logs messages to standard out.
-m pps_path
The PPS directory path. The subdirectories for storing the device, device control, driver, and mount objects are located in this directory. The default is /pps/qnx/.
-n iterations
Number of polling intervals (i.e., CD drive state readings) to skip before checking the device temperature. The time between successive polling intervals can be one of two values: the insertion polling interval or the removal polling interval, depending on the CD drive state. After querying the device for its temperature, cdpub updates the temperature_state and temperature_value attributes in the device object.
By default, cdpub skips 5 polling intervals between temperature checks.
-p insertion:removal
The insertion and removal polling intervals (in milliseconds), which are how often cdpub checks for CD insertions and removals. Often, you'll want the insertion interval to be shorter than the removal interval because detecting new CDs and publishing their information through PPS has higher priority than cleaning up PPS objects for removed CDs.
The default insertion interval is 1000 ms; the default removal interval is 2000 ms.
-r scope:init
Removal-prevention setting for CD devices. Both fields are Boolean and must be 0 or 1.
For scope, a value of 0 specifies a local scope for the removal-prevention setting, which means cdpub (and not the actual device) enforces that setting. A value of 1 makes cdpub query the device for its own removal-prevention setting before attempting to update or report the setting when requested by an application.
For init, a value of 0 makes cdpub allow device removals when it starts, while a value of 1 makes it prevent device removals. Applications can change the removal-prevention setting by writing a command to the device control object.
The default behavior is to use a local scope and allow device removal.
-s dll_path
The plugin path. At startup, cdpub looks in this path for plugins that it can load and use to provide more detailed device information (for details, see Plugins).
If this option isn't specified, no plugins are loaded.
Increase output verbosity. Setting one v logs CD insertions and removals. Setting two v's adds the logging of PPS object creation and deletion. Setting three or four v's logs more detailed events as well as errors that are less severe.
Increasing the output verbosity can help you understand the operation of cdpub. But when you specify many v's, the logging becomes significant. A higher verbosity setting is good for systems under development but probably shouldn't be used in production systems or during performance testing.


Note: You should start cdpub with an explicit command only if the process terminates unexpectedly. Before trying to start cdpub manually, always confirm that the service isn't already running by checking the list of active processes with pidin or ps.

The cdpub command starts the CD device publisher, which monitors the CD drive and publishes up-to-date information on CD devices through PPS.

You must name the raw device (i.e., /dev/cd0) with the -f option to tell cdpub which device path to use for monitoring the CD drive state. Through other options, you can set how often cdpub checks for CD insertions and removals, the default removal-prevention policy, and how it logs errors and events.

The cdpub service runs as a self-contained process that doesn't require any user input or accept any commands. It has no client utility for performing device-publishing tasks on request or for adjusting any of its settings. To reconfigure cdpub, you must restart the service with different command-line options. We recommend putting the cdpub command line in a startup script (e.g., to launch the publisher automatically during bootup.


The cdpub publisher may require the following abilities:

Use secpolmonitor to determine which abilities cdpub is using on your system.

For more information on abilities, see procmgr_ability() in the C Library Reference.