Changed paths:
M src/lxc/file_utils.c
M src/lxc/file_utils.h
M src/lxc/terminal.c
Log Message:
-----------
lxc/{terminal, file_utils}: ensure complete data writes in ptx/peer io handlers
Previously, lxc_write_nointr could return without writing all data
when write() returned EAGAIN/EWOULDBLOCK due to buffer full conditions.
This change:
- Implements a loop to continue writing until all data is sent
- Handles EINTR, EAGAIN, and EWOULDBLOCK errors appropriately
- Uses poll() to wait for fd to become ready when blocked
- Maintains backward compatibility while fixing partial write issues
Signed-off-by: DreamConnected <14874...@qq.com>
[ alex ]
- introduce a separate helper lxc_write_all and use it only in ptx/peer
io handlers
- cleanup the code a bit
Signed-off-by: Alexander Mikhalitsyn <aleksandr....@futurfusion.io>