lxc-rs
lxc-rs copied to clipboard
Attach/run_command example?
Hi
Do you have an example of how to use lxc::attach::run_command()
, specifically how to build the payload argument?
Thanks.
According to the C API documentation, the payload argument is a lxc_attach_command_t
.
As I can see in some code, this function should be use via container->attach
(and probably shouldn’t be public). If you have a small C example, that can accelerate my undestand of this point.
Well, I understand how this function work!
I write an example: https://github.com/sanpii/lxc-rs/blob/attach/examples/attach.rs
It’s compile but doesn’t work:
Error { num: 1, str: "" }