In Scope:
- Multiprocessing on a single machine
- Pipe communication
<iostream>
interfaces- Environment variables
- Definition of processes
- Path searching (depends on
std::filesystem
) (fixing unportability) - Process groups (use case: when a server/process spawns worker processes, we'd like to treat them as one entity) (the parent process isn't automatically included in any group)
- Children should die with the parent (if possible)
- on windows this is posssible using Job Objects example
- Parents survive their children when they die.
Not in scope:
- Acquiring a handle to an existing process
- Depends on the privileges, doesn't always work
- Named pipes
- Boost process uses them for asynchronous IO in windows
- Not fully portable across the board
- Listing / enumerating processes
- Setting up privileges for the child process (UID/GID)
- None of the languages we've looked at works
- we should put this to text
- Asynchronous communication
- Signals (although could be useful for implementation)
- Other IPC primitives (no
mmap
)
Boost process takes all arguments over a constructor call, so can't return an error code or expected like object. If the spawning fails, it throws an exception.
Moving the spawn to a free function could fix these problems.