On 10/31/2013 08:29 PM, chru...@suse.cz wrote:
> Hi!
>> But I need an exec() in the second case.
> I've overlooked the second case, however checkpoint works for this one
> as well. You need to build a helper binary setpgid03_child.c that would
> call the signal function and then do the wait.
>
> The checkpoint interface is build on the top of unix sockets so it does
> not matter whether the process was forked, execed or started from
> termial. All that is needed is correct CWD (which is inherited both on
> fork and exec) so that the socked special file is found.
>
There is one issue.

Look at lib/tests/tst_checkpoint_parent.c.

If the child exits before calling TST_CHECKPOINT_CHILD_WAIT(&checkpoint) 
(for example, if it gets a signal), the parent
will wait at TST_CHECKPOINT_SIGNAL_CHILD(NULL, &checkpoint) (blocking at 
open(O_WRONLY)) until we kill it manually.

I don't think that such situation can occur in this particular test case 
but if we had more activity (like function calls and some logic) before
execution of TST_CHECKPOINT_CHILD_WAIT in the child, we would have troubles.

Don't you think so? Or do I miss something?

Thank you.





------------------------------------------------------------------------------
November Webinars for C, C++, Fortran Developers
Accelerate application performance with scalable programming models. Explore
techniques for threading, error checking, porting, and tuning. Get the most 
from the latest Intel processors and coprocessors. See abstracts and register
http://pubads.g.doubleclick.net/gampad/clk?id=60136231&iu=/4140/ostg.clktrk
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

Reply via email to