mirror of
https://github.com/checkpoint-restore/criu.git
synced 2026-07-18 17:14:28 +00:00
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>
10 lines
203 B
C
10 lines
203 B
C
#ifndef FIFO_H__
|
|
#define FIFO_H__
|
|
|
|
struct fd_parms;
|
|
struct cr_fdset;
|
|
|
|
extern int dump_fifo(struct fd_parms *p, int lfd, const struct cr_fdset *set);
|
|
extern int collect_fifo(void);
|
|
|
|
#endif /* FIFO_H__ */
|