2012/3/20 Diego Iastrubni
> On יום שלישי 20 מרץ 2012 10:45:19 Erez D wrote:
> > > All theory I read before implementing this said this was a bad idea.
> The
> > > theory says that libc may maintain some mutex inside malloc() which is
> > > called
> > > from printf() for example. This means that e
On יום שלישי 20 מרץ 2012 10:45:19 Erez D wrote:
> > All theory I read before implementing this said this was a bad idea. The
> > theory says that libc may maintain some mutex inside malloc() which is
> > called
> > from printf() for example. This means that even trivial things may kill
> > your
> >
2012/3/19 Diego Iastrubni
> On יום שני 19 מרץ 2012 12:22:15 Erez D wrote:
> > On Mon, Mar 19, 2012 at 12:20 PM, Nadav Har'El
> wrote:
> > > On Mon, Mar 19, 2012, Erez D wrote about "Re: what happens if":
> > > > my reason for fork is only for ex
On יום שני 19 מרץ 2012 12:22:15 Erez D wrote:
> On Mon, Mar 19, 2012 at 12:20 PM, Nadav Har'El
wrote:
> > On Mon, Mar 19, 2012, Erez D wrote about "Re: what happens if":
> > > my reason for fork is only for exec() - to protect the first program
> > > f
On Mon, Mar 19, 2012 at 12:25 PM, Nadav Har'El wrote:
> On Mon, Mar 19, 2012, Erez D wrote about "Re: what happens if":
> > > If you're talking about the C language, you won't have any of these
> > > problems. System calls like close() or dup()
On Mon, Mar 19, 2012, Erez D wrote about "Re: what happens if":
> > If you're talking about the C language, you won't have any of these
> > problems. System calls like close() or dup() do not use any pthread
> > capabilities like mutexes.
>..
> i will be
On Mon, Mar 19, 2012 at 12:20 PM, Nadav Har'El wrote:
> On Mon, Mar 19, 2012, Erez D wrote about "Re: what happens if":
> > my reason for fork is only for exec() - to protect the first program from
> > the other.
>
> Then you should be all fine.
>
>
On Mon, Mar 19, 2012, Erez D wrote about "Re: what happens if":
> my reason for fork is only for exec() - to protect the first program from
> the other.
Then you should be all fine.
> the problem that may arise in forking a multithreaded is that one thread
> may lock a
On Mon, Mar 19, 2012 at 11:40 AM, Nadav Har'El wrote:
> On Mon, Mar 19, 2012, Erez D wrote about "what happens if":
> > what happens if i am running a multithreaded app ( 3 threads ) and one
> > thread calls fork() ?
>
> On Linux, the new process will run ONLY a copy of the thread doing the
> fork
On Mon, Mar 19, 2012, Erez D wrote about "what happens if":
> what happens if i am running a multithreaded app ( 3 threads ) and one
> thread calls fork() ?
On Linux, the new process will run ONLY a copy of the thread doing the
fork(). The other threads are *not* copied to the child process.
Ther
FTFM:
"The child process is created with a single thread - the one
that called fork()."
2012/3/19 Erez D
> what happens if i am running a multithreaded app ( 3 threads ) and one
> thread calls fork() ?
>
> ___
> Linux-il mailing list
> Linux-il@cs
Hi Erez,
On Mon, Mar 19, 2012 at 10:47:20AM +0200, Erez D wrote:
> what happens if i am running a multithreaded app ( 3 threads ) and one
> thread calls fork() ?
See pthread_atfork(3).
baruch
--
http://baruch.siach.name/blog/ ~. .~ Tk Open Systems
=}
12 matches
Mail list logo