[Ns-developers] About real-world application integration
Mathieu Lacage
mathieu.lacage at sophia.inria.fr
Mon Mar 16 04:49:19 PDT 2009
On Mon, 2009-03-16 at 19:40 +0900, Hajime Tazaki wrote:
> >> > {
> >> > NS_LOG_FUNCTION (this);
> >> > GarbageCollectDeadProcessesAndThreads ();
> >> >- for (std::vector<struct Process *>::iterator i = m_processes.begin
> >> >(); i != m_processes.end (); ++i)
> >> >+ for (std::vector<struct Process *>::iterator i = m_processes.begin
> >> >(); i != m_processes.end ();)
> >> > {
> >> > struct Process *process = *i;
> >> > DeleteProcess (process);
> >> >+ i = m_processes.erase (i);
> >> > }
> >> >- m_processes.clear ();
> >>
> >> I can make a patch, too.
> >
> >I meant that I don't really understand what this patch is doing: it
> >seems that it's really doing the same thing as before, only differently.
>
> Ah, sorry.
>
> When DeleteProcess is called, and threads is not empty,
> DeleteProcess hook SIGKILL in the context of DoDispose(),
> and delivered to simu_exit(). Then process is removed from
> m_processes before returning DeleteProcess().
>
> So if there is multiple processes in m_processes, it might
> be problem. This patch try to fix this.
I am really very sorry but I don't understand the problem this patch is
solving. Could you try to outline for me the exact scenario which is
problematic with the previous version ?
Mathieu
More information about the Ns-developers
mailing list