From: torvalds@linux.cs.Helsinki.FI (Linus Torvalds)
Subject: Re: vfork on Dec Alpha buggy?
Date: 1996/12/21 [thread overview]
Message-ID: <59h345$9qh@linux.cs.Helsinki.FI> (raw)
In-Reply-To: 59b722$6k4@usenet.pa.dec.com
In article <59b722$6k4@usenet.pa.dec.com>,
Burkhard Neidecker-Lutz <neideck@kar.dec.com> wrote:
>In article <E2M7CL.4q3@hermes.hrz.uni-bielefeld.de> chammer@hrz.uni-bielefeld.de (Carsten Hammer) writes:
>> < program modifying a global variable under vfork in a child and hoping
>> to see the change in the parent deleted>
>>For Reference look at Richard W. Stevens 'Advanced Programming in the Unix
>>Environment'
>
>You are relying on undefined (or rather, implementation defined) behaviour.
>BSD derived systems (such as Ultrix and SUNOS 4.1.3) will yield 7 on
>your program, while machines with proper copy-on-write semantics even on
>vfork will yield 6 (such as Digital Unix and Linux).
vfork() is an abomination, and should be shunned if possible. Burkhard
is correct in that both Digital UNIX and Linux will just silently do a
"fork()" regardless of what the user expected, in the hope that the user
doesn't care and just wants to get some old program that used vfork()
running.
However, future versions of Linux probably _will_ support traditional
vfork() behaviour, if only because it's pretty trivial to do with the
new Linux kernel threads model. That doesn't mean that I'd encourage
people to dust off their old programs, but if people really _want_ the
functionality I could code it up (only for Linux, though, don't expect
any OSF kernel patches from me ;)
Anybody who really has a program that would benefit from a "real"
vfork() on top of Linux is encoraged to contact me and tell me so, maybe
I'll get it going sooner that way..
Linus
prev parent reply other threads:[~1996-12-21 5:00 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
1996-12-18 5:00 vfork on Dec Alpha buggy? Carsten Hammer
1996-12-18 5:00 ` Ron Natalie
1996-12-18 5:00 ` Pierre Asselin
1996-12-19 5:00 ` Ron Natalie
1996-12-19 5:00 ` T. Horsnell (tsh)
1996-12-19 5:00 ` Burkhard Neidecker-Lutz
1996-12-21 5:00 ` Linus Torvalds [this message]
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox