Open abel-von opened 5 days ago
May I ask you to take a look at discussion done in https://github.com/containers/youki/pull/2749 , as it was opened with similar intentions.
@YJDoc2 Sorry, I also noticed that there is already a related PR after I submit this PR, but it seems it is a breaking change there, but in this PR, we just add three with_std*
functions in the builder, it seems no breaking change here.
Hey @abel-von , before checking further, couple of comments -
unsafe
? Seeing your reasoning for using RawFds, maybe it might be better to set these methods to unsafe if possible, and make sure user knows what they're doing, would that make sense?Hi @YJDoc2, The CI failure is fixed, could you please trigger the CI again. Thank you.
Hey, I think the tests are passing, but the lint and fmt CI is failing again. We use the just
commands in CI to validate, so you can also run them locally and check before pushing.
Also I'm wondering, would it be possible to have e2e or unit tests for this feature?
Hi @YJDoc2, just lint
and just test-all
has been run and codes are force pushed again, CI must be ok now. I tried to add a e2e test but it seems there is no e2e tests for libcontainer only, I can only add a unit test in builder.rs
to make sure the with_stdin
/with_stdout
/with_stderr
is correctly set.
I tried to add a e2e test but it seems there is no e2e tests for libcontainer only, I can only add a unit test in builder.rs to make sure the with_stdin/with_stdout/with_stderr is correctly set.
Ok, I'll think on this. Btw, I have run the CI again, but there are conflicts with main branch due to another PR that was merged. Can you take a look and resolve them? Thanks.
@YJDoc2 confliction is resolved. some of my just
command can not succeed because my own environment. please check again. Thanks
currently the container can only inherit stdios from it's parent process, the one who create container with libcontainer can not set stdios to a different file. this restrict the use of the libcontainer that a process can only create one container by itself, because we can't imagine that every container this process creates share the same stdin/stdout/stderr.