Source-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: src/usr.bin/make



Module Name:    src
Committed By:   rillig
Date:           Mon Feb  1 21:04:11 UTC 2021

Modified Files:
        src/usr.bin/make: compat.c job.c main.c make.h

Log Message:
make: always use vfork, never fork

Before compat.c 1.217, job.c 1.390 and main.c 1.504 from 2020-12-27, the
exported make variables were exported from each freshly forked child
process.  There was no practical difference though between exporting the
variables from the parent process or the child process since these two
processes share the same address space, except that the forked process
is very limited in what it may actually do.  This limitation was
violated on a regular basis.

When an exported variable referred to a variable that used the :sh
variable modifier, this led to a fork from within vfork, which is not
allowed.  Since 2020-12-27, exporting the variables is done from the
main process, which prevents this situation from ever occurring.

Since that day, there is no need anymore to distinguish between vfork
and fork, which removes any need for the macro.


To generate a diff of this commit:
cvs rdiff -u -r1.220 -r1.221 src/usr.bin/make/compat.c
cvs rdiff -u -r1.410 -r1.411 src/usr.bin/make/job.c
cvs rdiff -u -r1.525 -r1.526 src/usr.bin/make/main.c
cvs rdiff -u -r1.247 -r1.248 src/usr.bin/make/make.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.




Home | Main Index | Thread Index | Old Index