<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><span>> Well, the shell job C/R (<a href="http://criu.org/Advanced_usage#Shell_jobs_C.2FR" target="_blank">http://criu.org/Advanced_usage#Shell_jobs_C.2FR</a>)<br>
> is pretty close to what you try to achieve.</span><span><br>
> So,<br>
> <br>
> you are suggesting to use "--shell-job". I guess there must be a way to pass it on "criu_init_opts"?<br>
<br>
</span>criu_set_shell_job(true)<span><br></span></blockquote><div><br></div><div><div class="gmail_default" style="font-family:verdana,sans-serif">Hmm... I found out that <span style="font-family:arial,sans-serif"><b>criu_set_shell_job(true)</b> is </span>interchangeable with <b>setsid()</b>.</div></div><div><br></div><div><br></div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">Well, yes, this is what happens, but it's not necessarily to fork B for that. It's your<div class="gmail_default" style="font-family:verdana,sans-serif;display:inline"> </div>dumpApplication() that does fork(), not libcriu :)</blockquote><div><br></div><div><div class="gmail_default" style="font-family:verdana,sans-serif">I had no idea. The example I started with was using that extra fork I think.</div><div class="gmail_default" style="font-family:verdana,sans-serif">Now, I removed the extra fork, and now I correctly use (and understand) the <b>criu_set_leave_running</b>, so the initial process can continue execution.</div></div><div class="gmail_default" style="font-family:verdana,sans-serif"><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">I would be happy to help, but I don't understand what "function-only" capturing means. Can<div class="gmail_default" style="font-family:verdana,sans-serif;display:inline"> </div>you describe your scenario in more details?<br></blockquote><div><br></div><div><div class="gmail_default" style="font-family:verdana,sans-serif;display:inline">Currently, I dump a program before the execution of the function daxpy. Then, I can replay the program from that point onwards. That replaying is basically like a resuming from that point, and </div><span style="font-family:verdana,sans-serif">I can <div class="gmail_default" style="font-family:verdana,sans-serif;display:inline">do it</div> as many times as I want, since I have kept in disk some image files.</span></div><div><div class="gmail_default" style="font-family:verdana,sans-serif;display:inline"><br></div></div><div><div class="gmail_default" style="font-family:verdana,sans-serif;display:inline">So, dump has captured all information needed not only by the "daxpy" functions, but also for the rest of the program.</div></div><div><br></div><div><div class="gmail_default" style="font-family:verdana,sans-serif;display:inline"><br></div></div><div><div class="gmail_default" style="font-family:verdana,sans-serif;display:inline">What I want, is to execute let's say in isolation the function "daxpy". Then on dump,</div><span style="font-family:verdana,sans-serif"> I want t<div class="gmail_default" style="font-family:verdana,sans-serif;display:inline">he contents of the images to be just the </div></span><span style="font-family:verdana,sans-serif">necessary information that the function <div class="gmail_default" style="font-family:verdana,sans-serif;display:inline">"</div>daxpy<div class="gmail_default" style="font-family:verdana,sans-serif;display:inline">"</div> needs.</span></div><div><span style="font-family:verdana,sans-serif"><div class="gmail_default" style="font-family:verdana,sans-serif;display:inline">Such information are</div>:</span></div><div><div class="gmail_default" style="font-family:verdana,sans-serif">.the parameters of "daxpy"</div><div class="gmail_default" style="font-family:verdana,sans-serif">.the code of the functions that are being called by the "daxpy"<br></div><div class="gmail_default" style="font-family:verdana,sans-serif">.the global variables that are "touched" by "daxpy", or by the functions that are called by "daxpy"</div></div><div class="gmail_default" style="font-family:verdana,sans-serif"><br></div><div class="gmail_default" style="font-family:verdana,sans-serif">With this information, I will NOT be able to resume the program. But, I will be able to replay just the function "daxpy".</div><div class="gmail_default" style="font-family:verdana,sans-serif"><br></div><div class="gmail_default" style="font-family:verdana,sans-serif">Once again, thank you very much Pavel for your prompt and really informative replies!</div><div class="gmail_default" style="font-family:verdana,sans-serif"><br></div><div class="gmail_default" style="font-family:verdana,sans-serif">Cheers,</div><div class="gmail_default" style="font-family:verdana,sans-serif">Paschalis</div></div></div></div>