Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Attach/run_command example? #1

Open
andrenth opened this issue Jun 21, 2018 · 2 comments
Open

Attach/run_command example? #1

andrenth opened this issue Jun 21, 2018 · 2 comments

Comments

@andrenth
Copy link

Hi

Do you have an example of how to use lxc::attach::run_command(), specifically how to build the payload argument?

Thanks.

@sanpii
Copy link
Owner

sanpii commented Jun 21, 2018

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.

@sanpii
Copy link
Owner

sanpii commented Sep 26, 2021

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: "" }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants