Open zmrush opened 3 months ago
@kzys @dims @caniszczyk @tianon hi,can anyone see this commit?thanks
@mxpv can u check this commit?
Hi, @zmrush Do we have another solution? I'm not sure if opening it with O_NONBLOCK and then removing it afterward is a good approach.
In fact,there is no fifo(Typed IO) in containerd, containerd has pipedio only and pipedio open stdin(pipe) with block flag. but our fifo open fd with non-block,which is inconsistent. But if I remove the code(.custom_flags(libc::O_NONBLOCK)) of fifo and open fifo-file with O_BLOCK,the set method of FIFO is blocked by our unit-test and unit-test failed. So i only can modify the O_NONBLOCK flag afterward like this commit. So if we can change our unit test, then we only remove the code (.custom_flags(libc::O_NONBLOCK)). If we do not change our unit test, I can only rewrite the code with this commit. Wait for your reply @Burning1020
But if I remove the code(.custom_flags(libc::O_NONBLOCK)) of fifo and open fifo-file with O_BLOCK,the set method of FIFO is blocked by our unit-test and unit-test failed.
That's also the reason why I add this flag at the first init. I just feel a little awkward, CC @mxpv @abel-von @jsturtevant
if FIFO stdin set non-block, process in container may open stdin by block method and it will cause WouldBlock error when it read from stdin