<div dir="ltr"><br><br><div class="gmail_quote">2012/3/20 Diego Iastrubni <span dir="ltr"><<a href="mailto:elcuco@kde.org">elcuco@kde.org</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im">On יום שלישי 20 מרץ 2012 10:45:19 Erez D wrote:<br>
> > All theory I read before implementing this said this was a bad idea. The<br>
> > theory says that libc may maintain some mutex inside malloc() which is<br>
> > called<br>
> > from printf() for example. This means that even trivial things may kill<br>
> > your<br>
> > app. The theory says that in multithreaded applications as soon as you<br>
> > clone()<br>
> > (the system called used by pthread_create()) you should execvp.<br>
> ><br>
> > In my application (a lot of C++, running on linux 2.6.32, glibc 2.9 and<br>
> > glibc<br>
> > 2.11.1 on ARM) erverything worked perfectly against the theory, your<br>
> > mileage<br>
> > may vary.<br>
><br>
> what do you mean by " erverything worked perfectly against the theory" -<br>
> did it work or did you have problems although you just execvp after clone ?<br>
</div>Sorry, to be clear:<br>
<br>
I cloned(), then forked(), but no exec*() was called in the new child process.<br></blockquote><div>doesn't clone() and fork() do similar things ? why fork() after clone() ? <br></div><blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
Everything worked fine in my setup. But again, YMMV.<br>
</blockquote></div><br></div>