Would it be better to generalize existing calls?
Would it be better to generalize existing calls?
Posted Aug 5, 2026 15:01 UTC (Wed) by epa (subscriber, #39769)Parent article: The beginning of a process-builder API
This is great work, but an idea I think deserves more consideration is to generalize existing Unix system calls so they can operate on another process. For example open() would get an extra argument giving the process id; the parent process could use it to open files in the child. dup2() and chdir() could also operate on another process. And so on. This seems more like the "Unix way". (Of course these new more general syscalls would need a new name, but in spirit they are the same primitives we already know.) After creating the child process and setting up its files, a final start_process() call would make it start running.
Even if the implementation were restricted, so that you can only start opening files in another process if you are its direct parent, it's running as the same user, and it hasn't yet started executing, that would still give a cleaner way to express the actions without the need for a new structure.
