[CRIU] Another question / roadblock

Andrei Vagin avagin at gmail.com
Tue Oct 15 09:10:35 MSK 2019


On Mon, Oct 14, 2019 at 09:49:31PM -0400, Eliot Moss wrote:
> 
> Now that I have figured out how to adjust file lengths before invoking
> restore, I have another "interesting" issue.
> 
> My jobs have one part that is some layers of shell script that bottoms out
> with an invocation of valgrind, which produces output to a named pipe (fifo).
> Then they have another part that reads from the named pipe, sends the output to
> about 8 analysis programs, compresses their output, etc.
> 
> This second part is created, and then disowned with the shell disown command.
> 
> Applying dump to the first part does not capture the second part.  So my
> question is, how do I capture both parts?
> 
> (Explanation: I did things this way so that the analysis jobs don't die
> when the valgrind jobs finishes, but finish reading from the fifo and
> processing the buffered data.)

I think you need to run your processes in a new pid namespace.
http://man7.org/linux/man-pages/man7/pid_namespaces.7.html

The easiest way to run a process in a new pid namespace is to use
the unshare tool:

sudo unshare -pf sh -c 'echo "My pid is $$"'

or the same without sudo:

unshare -Urfp sh -c 'echo "My pid is $$"'

> 
> Regards - Eliot
> _______________________________________________
> CRIU mailing list
> CRIU at openvz.org
> https://lists.openvz.org/mailman/listinfo/criu


More information about the CRIU mailing list