When I say memory , I mean when make starts then in the main function I
have the getpid to give me the parent pid which I save in the env and that
is available to all the child processes so that I can find out when the
parent make has come into child handler by checking getpid == make pid from
env and do some stuff based on it.

On Sun, 22 May 2022 at 6:52 PM, Paul Smith <psm...@gnu.org> wrote:

> On Sun, 2022-05-22 at 10:53 +0530, nikhil jain wrote:
> > 1) write some content in a file only if the forked process ID is same
> > as the main make process ID (stored main process ID in the memory as
> > make starts so that it will be available to all the forked process).
>
> I don't understand this.  Yes, make will fork a new process but then it
> immediately does an exec, including when invoking a sub-make, so no
> memory is shared between make processes.
>

Reply via email to