> I'm puzzled by the first wait_for_flag invocation. Wouldn't that
> continue to loop in the infinite loop with the parent pid?
> Furthermore, it doesn't make sense for wait_for_flag to be used at all
> (or the equivalent in the existing test) in the test as the memory
> isn't shared between processes after the fork is done, apart from
> dealing with vfork -- which is only with UCLINUX (fork does COW, vfork
> doesn't), and the subsequent exec does the COW for us.
> This really should use pipes or something equivalent to message
> the child process(es) to continue.

flag is pointer to shared memory, and according to shmget(2)/shmat(2):
"After a fork() the child inherits the attached shared memory segments."

It does complete, gdb and valgrind seem to be fine with it, but to
be completely honest, I haven't tried it with UCLINUX.

I made one copy paste error in wait_for_flag, so I'll post a v3.

> Thanks,
> -Garrett

------------------------------------------------------------------------------
Benefiting from Server Virtualization: Beyond Initial Workload 
Consolidation -- Increasing the use of server virtualization is a top
priority.Virtualization can reduce costs, simplify management, and improve 
application availability and disaster protection. Learn more about boosting 
the value of server virtualization. http://p.sf.net/sfu/vmware-sfdev2dev
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

Reply via email to