| Updated: October 28, 2024 |
Add a waitfor action to an action, which executes if the corresponding action fails after a specified delay
#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 ahdl. 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:
or:
The action is executed when the corresponding action that it is associated with, fails.
Currently, there are no flags defined.
In addition to the above errors, the HAM returns any error it encounters while servicing this request.
| Safety: | |
|---|---|
| Cancellation point | No |
| Interrupt handler | No |
| Signal handler | No |
| Thread | Yes |