[CRIU] Re: [PATCH 5/8] pipes: Add c/r for fifo files
Pavel Emelyanov
xemul at parallels.com
Fri Jun 22 09:10:06 EDT 2012
On 06/22/2012 04:24 PM, Cyrill Gorcunov wrote:
>
> Basically pipes are superset over fifos, so we integrate
> fifo c/r into pipes.c file.
>
> There os acatually a trick used to open fifo files --
> since fifo may block on opening we create a fake fifo
> to be able to proceed without sleeping.
>
> Signed-off-by: Cyrill Gorcunov <gorcunov at openvz.org>
> ---
> cr-dump.c | 8 ++-
> cr-show.c | 15 +++-
> include/image.h | 10 +++
> include/pipes.h | 14 ++-
> pipes.c | 220 +++++++++++++++++++++++++++++++++++++++++++++++-------
> 5 files changed, 229 insertions(+), 38 deletions(-)
>
After more thinking. Why fifos has anything to do with pipes.c except for the
"pipe data". The whole (other than pipedata) code in pipe.c was written to handle
the double-ended pipe nature. With fifos you can _just_ dump it as a regular file
(plus the trick with fake fifo) and restore the pipe data at the end. No?
More information about the CRIU
mailing list