Bug 108016 - Problem with vfork in GNU version 3.2.2
Summary: Problem with vfork in GNU version 3.2.2
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: kernel
Version: 9
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Jakub Jelinek
QA Contact: David Lawrence
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2003-10-26 10:28 UTC by Mohan Mohta
Modified: 2007-04-18 16:58 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2003-10-27 09:23:52 UTC
Embargoed:


Attachments (Terms of Use)

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.


Note You need to log in before you can comment on or make changes to this bug.