ConfD User Community

About Aborting Current Action

Hello Folks,

I followed intro/7-c_actions example.
I define new tail-f action point which name is “loop” in the config.yang file.
And then i added a new switch case which contains this statement “for(;;){}”

and i call the loop action over cli by using this command “config system loop”
my application is entering to loop statement. Everything is ok.
But i want to abort this action.
If i press “ctrl+x”, then i see that message “Aborted: by user” on the screen.
But my application is still in the loop. Is there any programatic way to cancel current loop situation on the application code?

Many Thanks,
With My Best Regards,

See the tailf:interrupt extension (substatement to the tailf:exec extension) in the tailf_yang_extensions(5) man page (which is also an appendix in the ConfD UG)

If you used a tailf:actionpoint statement and implement an action data provider application with callbacks, register the abort() callback when you call confd_register_action_cbs(). See the confd_register_action_cbs() function in the confd_lib_dp(3) man page.