2 ms·
You could "spawn" a separate minimal binary that only has to set up the proper environment, then have that binary "exec" into the intended process.
by zozbot234 4y ago
You could "spawn" a separate minimal binary that only has to set up the proper environment, then have that binary "exec" into the intended process.
- bluetomcat 4y agoBut that "minimal" binary would be a static and independent piece of code nevertheless. It wouldn't have access to the memory space of the parent so as to work with the already open descriptors without probing for them, it cannot use data already processed by the parent in the form of paths, etc. Essentially you run into the same problem - now the complexity of the spawn(...) interface is shifted to that binary.
- zozbot234 4y ago> It wouldn't have access to the memory space of the parent so as to work with the already open descriptors without probing for them, it cannot use data already processed by the parent in the form of paths, etc. You could simply use ordinary IPC for these things, though. They need not be implemented as part of the OS.