libcli icon indicating copy to clipboard operation
libcli copied to clipboard

How to use libcli with multiple processes ?

Open tsavoritesi-vgarg opened this issue 1 year ago • 1 comments

Hello ,

Hope you are doing well. I am looking at your libcli code in github and have a question. I see the codes and examples where both CLI commands are and cli_loop() part of the same process, and it works fine.

My application has multiple processes listening on the UNIX_AF socket . And I want to provide a single CLI interface to the customer, So do you have any example of how I can implement it ?

Thanks

tsavoritesi-vgarg avatar Sep 11 '24 00:09 tsavoritesi-vgarg

Hi - our use case hasn't worked this way, and the core data structures in libcli do not have any design features to allow for multiple simultaneous but independent instances. My suggestion would be that your listener on the UNIX_AF socket would spawn a new process (not thread) for each independent instance.

RobSanders avatar Sep 11 '24 11:09 RobSanders