www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1993/06/01/16:00:26

Date: Tue, 1 Jun 93 15:02:28 EDT
From: engdahl AT brutus DOT aa DOT ab DOT com (Jon Engdahl)
To: williams AT herky DOT cs DOT uiowa DOT edu
Subject: Re: page fault handler problem
Cc: djgpp AT sun DOT soe DOT clarkson DOT edu

> From williams AT herky DOT cs DOT uiowa DOT edu Tue Jun  1 14:12:46 1993
 
> Well for one thing the current version of make is 3.67+

Oops, they must be changing things fast. That's one reason I am doing
it this way - the fewer changes I have to make to the GNU source, the
easier it is to upgrade.

> 
> The answer to your question is that yes, vfork is like your plastic fork.
> If you know of places where global and static variables are clobbered, please
> mail them to me; I can mail them to the author, since it is definitely the
> case that you shouldn't screw around with the parent address space when
> you vfork.


Aha! - I figured this one out - in job.c, the following line:

	child->pid = vfork();

is dependent on whether the parent or child executes first. In a
standard UNIX vfork, the child executes first, and the code works. In
my implementation, currently the parent executes first, then the child,
so that when the child exits the parent is waiting to catch the
status. In this case, child->pid gets clobbered with a zero when the
child executes second. Maybe this isn't a bug - if I can make the
plastic fork work more like vfork, this problem will go away.

 
> The work I did in porting gnu-make to OS/2 might be of some aid.
> here's the diffs to 3.64, though they should work fine with 3.65.
> 

Thanks for the diffs. Just glancing through, you seem to have changed
the same places that I did, although our solutions were different, and
I haven't got as far as you went. This will be a great help. I am hoping
that I won't have to change as much as you did, due to impelemnting
vfork.

Jonathan Engdahl, Sr. Project Engineer | engdahl AT aa DOT ab DOT com N8XVY 313-998-2450
Allen-Bradley Co.                      | A Rockwell International Company
555 Briarwood Circle,                  | Industrial Communication Networks
Ann Arbor, Michigan, 48108, USA        | system design, software, ASICs

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019