Subject: fork1 and new stack
To: None <>
From: Emmanuel Dreyfus <>
List: tech-kern
Date: 04/25/2002 21:42:16

I'm trying to get IRIX sproc() emulation going on. sproc() spawns a new
lightweight process. I plan to emulate this with a call to fork1() with

On IRIX, the child has a stack at offset 0x0400000 from the parent
stack. If try to call fork1() with stack (SP - 0x0400000) and stacksize
(vm_maxssize - vm_minssize), the child just does a SIGSEGV on a stack

Any idea why?=20

More input: sproc() takes an entry argument with the address of the
function where the child should start. I emulated this by setting the
child's PC saved on trapframe to entry. But I doublt that this can cause
the problem.

Speaking about fork1(9): the man page seems a bit outdated...
Emmanuel Dreyfus.                              
X Window, c'est un millefeuille avec une couche de cr=E8me patissi=E8re, un=
de ketchup, et une d'anchois. Faut aimer. Mais c'est vrai que c'est un=20
systeme ouvert: on peut ajouter des pepites de chocolat et des c=E2pres