Bug 108016

Summary: Problem with vfork in GNU version 3.2.2
Product: [Retired] Red Hat Linux Reporter: Mohan Mohta <mohan_mohta>
Component: kernelAssignee: Jakub Jelinek <jakub>
Status: CLOSED NOTABUG QA Contact: David Lawrence <dkl>
Severity: medium Docs Contact:
Priority: medium    
Version: 9   
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2003-10-27 09:23:52 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Mohan Mohta 2003-10-26 10:28:33 UTC
Description of problem:


Version-Release number of selected component (if applicable):


How reproducible:
By using vfork
#include <stdio.h>
int main(int argc, char *argv[])
{
vfork();
}
Steps to Reproduce:
1.compile the program
2.run the program
3.
    
Actual results:

GNU C Library stable release version 2.3.2, by Roland McGrath et al.
Copyright (C) 2003 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
Compiled by GNU CC version 3.2.2 20030222 (Red Hat Linux 3.2.2-5).
Compiled on a Linux 2.4.20 system on 2003-03-13.
Available extensions:
	GNU libio by Per Bothner
	crypt add-on version 2.1 by Michael Glad and others
	NPTL 0.29 by Ulrich Drepper
	BIND-8.2.3-T5B
	NIS(YP)/NIS+ NSS modules 0.19 by Thorsten Kukuk
Thread-local storage support included.
Report bugs using the `glibcbug' script to <bugs>.


Expected results:


Additional info:

Comment 1 Jakub Jelinek 2003-10-27 09:23:52 UTC
Your testcase is ill-formed.
See man vfork:
"except that the behaviour is undefined if the process created  by  vfork()  either
... , or returns from the  function  in which vfork() was called"
That's exactly what you're trying to do.
The difference between vfork and fork is that vfork provides performance boost
but makes very strong requirements what you can and what you cannot do.