Subject: Re: unproven-pthreads problem (?) Virtual timer expired
To: Robert Elz <kre@munnari.OZ.AU>
From: Olaf Seibert <rhialto@polderland.nl>
List: current-users
Date: 08/10/2000 12:41:10
On Thu 10 Aug 2000 at 19:30:10 +1000, Robert Elz wrote:
> Tradition has always been that timers are inherited through both
> fork() and exec() - from back when the only timer was that set by alarm()
> (ie: from 7th edition days).

Then the question arises: why does unproven-pthreads not take this into
account? Hm... looking at pthreads/process.c, it seems to attempt to, at
least... it wraps fork() and in the child it means to clear the timer.

And it replaces vfork() by fork().  On the other hand, in the ktrace
output, I clearly see a vfork happening, and no clearing of timers:

  8439 python   GIO   fd 1 wrote 22 bytes
       "Running command: make
       "
  8439 python   RET   write 22/0x16
  8439 python   CALL  __vfork14
  8440 python   RET   fork 0
  8440 python   CALL  execve(0x1604f6676,0x1ffffe980,0x1ffffef78)
  8440 python   NAMI  "/bin/sh"
  8440 sh       EMUL  "netbsd"
  8439 python   RET   __vfork14 8440/0x20f8
  8439 python   CALL  wait4(0x20f8,0x1ffffe9a0,0x1,0)
 
Hm.. can it be that python actually calls __vfork14() while libpthread
actually wraps plain vfork()? I'll have a look...

> kre
-Olaf.
-- 
___ Olaf 'Rhialto' Seibert - rhialto@polder    -- Ah only did well at school
\X/ land.nl       -- tae git intae an O level class tae git away fae Begbie.
Hi! I am a .signature virus. Copy me into your .signature to help me spread.