* fork.cc (fork): Reset child to true after fork since it may have been reset
by fork memory copies.
This commit is contained in:
parent
6e070c257c
commit
e943a1a37e
|
@ -1,3 +1,8 @@
|
||||||
|
2007-03-01 Christopher Faylor <me@cgf.cx>
|
||||||
|
|
||||||
|
* fork.cc (fork): Reset child to true after fork since it may have been
|
||||||
|
reset by fork memory copies.
|
||||||
|
|
||||||
2007-03-01 Christopher Faylor <me@cgf.cx>
|
2007-03-01 Christopher Faylor <me@cgf.cx>
|
||||||
|
|
||||||
* Makefile (DLL_OFILES): Remove ntea.o
|
* Makefile (DLL_OFILES): Remove ntea.o
|
||||||
|
|
|
@ -94,6 +94,7 @@ public:
|
||||||
|
|
||||||
class hold_everything
|
class hold_everything
|
||||||
{
|
{
|
||||||
|
public: /* DELETEME*/
|
||||||
bool& ischild;
|
bool& ischild;
|
||||||
/* Note the order of the locks below. It is important,
|
/* Note the order of the locks below. It is important,
|
||||||
to avoid races, that the lock order be preserved.
|
to avoid races, that the lock order be preserved.
|
||||||
|
@ -620,11 +621,13 @@ fork ()
|
||||||
volatile char * volatile esp;
|
volatile char * volatile esp;
|
||||||
__asm__ volatile ("movl %%esp,%0": "=r" (esp));
|
__asm__ volatile ("movl %%esp,%0": "=r" (esp));
|
||||||
|
|
||||||
|
|
||||||
if (!ischild)
|
if (!ischild)
|
||||||
res = grouped.parent (esp);
|
res = grouped.parent (esp);
|
||||||
else
|
else
|
||||||
|
{
|
||||||
res = grouped.child (esp);
|
res = grouped.child (esp);
|
||||||
|
ischild = true; /* might have been reset by fork mem copy */
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
MALLOC_CHECK;
|
MALLOC_CHECK;
|
||||||
|
|
Loading…
Reference in New Issue