exec() system call

hi there,
i was reading about the exec() function. and if i m not wrong, exec() kills your present process and starts a new process in its place. the process id remains the same.
then it says if exec is successful the text data and stack are overlayed by new file! -
i dont get this part "only user area is maintained across exec system call"
can someone tell me what the user area is in particular? like what part of a program would be user area!?
Thank You!

No part of the program is in the user area. Exactly what is there varies from one version of unix to the next. But some possible examples:

process start time
controlling terminal of process
current directory of the process
size of the stack
size of the data segment
uid of the process

In short its a bunch of stuff that the kernel needs to manage the process. But the kernel stores it in the process to keep the kernel small. This made sense when computers had 16 bit addresses. It makes less sense these days with 32 or even 64 bit addresses. Some kernels are moving a lot of stuff out of the uarea and into the proc table.

If you poke around /usr/include, you may find user.h which will show exactly what's in your uarea.

Perderabo,
thanks for the answer. i tried looking in /usr/include for user.h or something similar but it wasn't there. ne way i won't confuse myself at this stage for that. your answer was sufficient and i'll shut up now :smiley: