Artificial intelligent assistant

Does the Linux kernel support a PARTIAL exec I was looking at another question (< and saw an answer, about how much set up this other OS had to do, for every Process Create. I got wondering. Would it be possible to do the setup (once, then fork), then do a **partial** exec to load the variable parts? That is only part of the process should be replaced. A specific example of partial, would be. We want to load some execution environment, then exec to replace the loader, but not the environment. So this is taking control of what gets replaced (I know that exec does not replace everything (e.g. it keeps a COW of the file descriptor table)). I realise that this may not have any practical use, as `fork` and `exec` are relatively cheep on many Unixes.

> Of course you can do a "partial exec"; you `mmap(PROT_EXEC)` pages from another file into your address space, jump into them, and yuppie! "partial exec". I don't know if you can replicate everything exec does in userspace -- but you certainly can replicate most of it.

— taken from comment of @pizdelect

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy 9bb4074417735956522cdc0f006dcc55