RC\_PLUGIN\_HOOK(3) Library Functions Manual (smm) RC\_PLUGIN\_HOOK(3)

# [NAME](#NAME)

`rc_plugin_hook` — hooks plugins into OpenRC services

# [LIBRARY](#LIBRARY)

Run Command library (librc, -lrc)

# [SYNOPSIS](#SYNOPSIS)

`#include <rc.h>`

`int`  
`rc_plugin_hook`(`RC_HOOK hook`, `const char *name`);

# [DESCRIPTION](#DESCRIPTION)

[`rc_plugin_hook`](#rc_plugin_hook)() is called for each shareable object found in /lib/rc/plugins. `hook` is set to the hook running, and `name` is set to the name of the runlevel or name of the service.

Plugins can affect the parent environment by writing NULL separated strings to `rc_environ_fd`.

# [SEE ALSO](#SEE_ALSO)

[openrc(8)](/man/os/openrc/openrc.8), [openrc-run(8)](/man/os/openrc/openrc-run.8)

# [AUTHORS](#AUTHORS)

Roy Marples &lt;roy@marples.name&gt;

March 16, 2008 OpenRC

---

Document: rc_plugin_hook(3) from openrc 0.64.1-r4 (Chainguard OS)
Source: https://github.com/OpenRC/openrc
