diff options
| author | Donald Sharp <sharpd@nvidia.com> | 2025-01-15 13:03:52 -0500 |
|---|---|---|
| committer | Donald Sharp <sharpd@nvidia.com> | 2025-01-17 10:16:48 -0500 |
| commit | 4b967527376db4f08c50f9c32cc77556700d0eec (patch) | |
| tree | eff5aef743a9ad684e1628bb4caeedf61d2f09fd /zebra | |
| parent | 283cc511781f9e076baf8564dae234de52cb290a (diff) | |
zebra: Add some documentation on when zserv_open should be used
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Diffstat (limited to 'zebra')
| -rw-r--r-- | zebra/zserv.c | 4 | ||||
| -rw-r--r-- | zebra/zserv.h | 3 |
2 files changed, 7 insertions, 0 deletions
diff --git a/zebra/zserv.c b/zebra/zserv.c index 7ef3582329..6965c285cd 100644 --- a/zebra/zserv.c +++ b/zebra/zserv.c @@ -937,6 +937,10 @@ void zserv_close(void) /* * Open zebra's ZAPI listener socket. This is done early during startup, * before zebra is ready to listen and accept client connections. + * + * This function should only ever be called from the startup pthread + * from main.c. If it is called multiple times it will cause problems + * because it causes the zsock global variable to be setup. */ void zserv_open(const char *path) { diff --git a/zebra/zserv.h b/zebra/zserv.h index ce47ef19fa..1ff7ccd981 100644 --- a/zebra/zserv.h +++ b/zebra/zserv.h @@ -262,6 +262,9 @@ extern void zserv_close(void); * * path * where to place the Unix domain socket + * + * This function *should* only ever be called from + * main() and only every from 1 pthread. */ extern void zserv_open(const char *path); |
