Look up a process-manager ability
Synopsis:
#include <sys/procmgr.h>
int procmgr_ability_lookup( const char *name );
Arguments:
- name
- The name of the ability. This name should by convention consist of a service
identifier followed by a capability identifier (e.g., "fs-qnx6/some_devctl").
The maximum length is 127 characters (PROCMGR_ABILITY_NAME_MAX).
Library:
libc
Use the -l c option to qcc to link against this library. This library is usually
included automatically.
Description:
The procmgr_ability_lookup() function looks up a process-manager
ability that was (or will be) created by a call to procmgr_ability_create().
Note: There's no requirement for a call to procmgr_ability_create() to
precede calls to procmgr_ability_lookup(). This avoids forcing any
specific ordering of process initialization.
In QNX Neutrino 7.0 or later, if
the ability hasn't yet been created:
- If your process has the PROCMGR_AID_ABLE_CREATE ability enabled (see
procmgr_ability()),
procmgr_ability_lookup() creates the ability and returns a permanent
identifier for it.
- If your process doesn't have the PROCMGR_AID_ABLE_CREATE ability enabled,
procmgr_ability_lookup() returns a temporary identifier that includes
the PROCMGR_AID_UNCREATED bit. You can use the temporary identifier with
ConnectClientInfoAble() (which will see if the ability has
been created and give you a permanent identifier), but not with procmgr_ability(). You can
call procmgr_ability_lookup() again later, in the hope that the ability
has been created and so will have a permanent identifier.
For a list of QNX defined custom abilities, see
Abilities in the Security Policy Guide.
Returns:
A numeric ability identifier, or a negative errno value if an error occurred. You can use the ability
identifier in calls to procmgr_ability() or to verify the abilities of a
client.
Classification:
QNX Neutrino
Safety: |
|
Cancellation point |
No |
Interrupt handler |
No |
Signal handler |
Yes |
Thread |
Yes |