-
Cyrill Gorcunov authored
Checkpoint and restore of fifo is similar to pipes c/r except the pipe end-points are named file. Because the fifo has a name we use regular files facility for fifo path c/r. Still there is a trick used to "open" fifo: the opening procedure migh sleep if a fifo's peer is not yet opened, so before doing a real open we yield a fake open procedure (with O_RDWR flag) which prevents us from sleeping even if peer is not yet ready. Also we need writable fifo end to restore data queued. v2: - add open/priv members to reg_file_info - make open_fifo_fd to use open_fe_fd - comment on pipe_id - make sure the fifo data is not restored twice v3: - drop useless fixme comment and add sane one v4: - Use restore_data flag to escape data restore duplication - Use S_ISREG for file contents copying Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
ea1ce8e4