On 4 Nov 1999, Vimal Mathew wrote:
> -
> main()
> {
> int i;
>
> printf("Should appear only once");
> for (i = 0; i<10 ;i++) fork();
Hi,
i have a doubt regarding fork(). Even if i modify the value of 'i'
(or any variable declared in parent) in the child and
if i try to print the address of 'i' ,
both child and parent shows the same address. Why is that.
Is it because both parent and child uses same virtual address space.
If so how it can correctly access the addressed variable(whether child
or parent)
Please clarify
sudheer
--------------------------------------------------------------------
The Linux India Mailing List Archives are now available. Please search
the archive at http://lists.linux-india.org/ before posting your question
to avoid repetition and save bandwidth.
- RE: [LI] C Programming problem LENGARD Pascal OCISI
- [LI] leased line and bandwidth testing s.goswami
- Re: [LI] leased line and bandwidth testing Bhyrava Prasad
- Re: [LI] C Programming problem Mrinal Kalakrishnan
- Re: [LI] C Programming problem Vimal Mathew
- [LI] C Programming problem Umesh Kumar Sisodia
- Re: [LI] C Programming problem Binand Raj S.
- Re: [LI] C Programming problem sudheer
- Re: [LI] C Programming problem Shourya Sarcar
- Re: [LI] C Programming problem Shourya Sarcar
- [LI] C Programming problem Mrinal Kalakrishnan
- Re: [LI] C Programming problem Shourya Sarcar
- Re: [LI] C Programming problem Anand Singh Bisen
- Re: [LI] C Programming problem Ashu Razdan
- Re: [LI] C Programming problem T Subramania Sharma
- Re: [LI] C Programming problem Sojan James
- Re: [LI] C Programming problem Binand Raj S.
