Warning: main(/www/www/htdocs/style/globals.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/ham_en/ham/hamapi/ham_action_fail_waitfor.html on line 1
Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/globals.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/ham_en/ham/hamapi/ham_action_fail_waitfor.html on line 1
Warning: main(/www/www/htdocs/style/header.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/ham_en/ham/hamapi/ham_action_fail_waitfor.html on line 8
Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/header.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/ham_en/ham/hamapi/ham_action_fail_waitfor.html on line 8
Add a waitfor action to an action, that will be executed
if the corresponding action fails
#include <ha/ham.h>
int ham_action_fail_waitfor(
ham_action_t *ahdl,
const char *aname,
const char *path,
int delay,
unsigned flags);
libham
The ham_action_fail_waitfor() function adds an action fail
item (aname) to the
specified action. The action will either delay for delay
milliseconds or wait until path (if specified) appears
in the name space (whichever is earlier).
The path parameter must contain the FULL path that is
being watched for.
The handle (ahdl) is obtained either:
- from one of the ham_action*() functions to add actions
or:
- by calling any of the ham_action_handle() functions
to request a handle to a specific action.
The action is executed when the corresponding action that it
is associated with, fails.
Currently, there are no flags defined.
- 0
- Success.
- -1
- An error occurred (errno is set).
- EBADF
- Couldn't connect to the HAM.
- EINVAL
- The name given in aname is invalid (e.g. it
contains the “/” character) or is NULL.
The connection to the HAM is invalid. This happens when the
process that opened the connection (using ham_connect())
and the process that's calling ham_action_execute() aren't the same.
- ENAMETOOLONG
- The name given (in aname) is too long, i.e.
it exceeds _POSIX_PATH_MAX (defined in <limits.h>).
Note that the combined length of an entity/condition/action
name is also limited by _POSIX_PATH_MAX.
- ENOENT
- There's no entity or condition specified by the given
handle (ahdl).
- ENOMEM
- Not enough memory to create a new handle.
In addition to the above errors, the HAM returns any error
it encounters while servicing this request.
QNX Neutrino
Safety: | |
Cancellation point |
No |
Interrupt handler |
No |
Signal handler |
No |
Thread |
Yes |
ham_action_execute(),
ham_action_fail_execute(),
ham_action_handle(),
ham_action_handle_free(),
ham_action_heartbeat_healthy(),
ham_action_log(),
ham_action_notify_pulse(),
ham_action_notify_signal(),
ham_action_remove(),
ham_action_restart(),
ham_action_waitfor(),
ham_condition(),
ham_condition_handle()
Warning: main(/www/www/htdocs/style/footer.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/ham_en/ham/hamapi/ham_action_fail_waitfor.html on line 173
Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/footer.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/ham_en/ham/hamapi/ham_action_fail_waitfor.html on line 173