9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: Victor Nazarov <vir@comtv.ru>
To: Fans of the OS Plan 9 from Bell Labs <9fans@cse.psu.edu>
Subject: Re: [9fans] APE fork()
Date: Sat, 12 Aug 2006 16:42:46 +0400	[thread overview]
Message-ID: <44DDCCC6.9010709@comtv.ru> (raw)
In-Reply-To: <114497aa64fc109a727c87b528cfd1ea@mail.gmx.net>

Sascha Retzki wrote:

>Hello list,
>
>/sys/src/ape/lib/ap/plan9/fork.c does an 
>	_RFORK(RFENVG|RFFDG|RFPROC);
>
>Why not RFMEM? Imho on POSIX-fork(), the child shares the address-space with the parents.  
>
>It is not that I really care myself, #include <lib9.h> fixes a lot of things,;) ,but I fear programmes which rely on that may not work. Is there a specific reason fork.c:fork() does not fork with RFMEM?
>
>
>Mfg, Sascha
>  
>
rfork (2):
``RFMEM --- If set, the child and the parent will share data and bss 
segments. Otherwise, the child inherits a copy of those segments. Other 
segment types, in particular stack segments, will be unaffected. May be 
set only with RFPROC.''

POSIX-fork() copies data and bss segmets, child process doesn't share 
data with it's parent. There are POSIX-threads, SYSV-IPC to share memory.
--
Victor



  reply	other threads:[~2006-08-12 12:42 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-08-12 12:15 Sascha Retzki
2006-08-12 12:42 ` Victor Nazarov [this message]
2006-08-12 12:40   ` Sascha Retzki
2006-08-12 12:55     ` Charles Forsyth
2006-08-12 13:00     ` Victor Nazarov
2006-08-12 14:44   ` david bulkow
2006-08-12 15:09     ` Sascha Retzki
2006-08-12 15:14     ` Victor Nazarov
2006-08-12 15:15     ` Russ Cox
2006-08-12 15:43       ` Leonardo Valencia
2006-08-12 17:22       ` Brantley Coile
2006-08-12 17:54         ` erik quanstrom
2006-08-12 18:57           ` Bakul Shah
2006-08-12 19:54       ` Charles Forsyth
2006-08-12 20:07         ` erik quanstrom
2006-08-14  4:04           ` Iruatã Souza
2006-08-14  4:33             ` erik quanstrom
2006-08-14 14:41               ` Ronald G Minnich
2006-08-14 14:48                 ` erik quanstrom
2006-08-14 14:56                   ` Ronald G Minnich
2006-08-14 15:25                     ` erik quanstrom
2006-08-14 14:59                 ` Martin Neubauer
2006-08-14 15:33                   ` John Floren
2006-08-14 15:57                     ` erik quanstrom
2006-08-14 13:48       ` Dave Lukes
2006-08-15  4:19       ` William Josephson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=44DDCCC6.9010709@comtv.ru \
    --to=vir@comtv.ru \
    --cc=9fans@cse.psu.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).