Setup signal handlers
Block signals
fork()
Unblock signals
Main BuildStream Process
Job Process
Initialize subprocess logging redirection
Unblock selected signals (ready)
Run the job payload
Log messages
Start New Job
Receive IPC Messages
Report job result and any other state
Collect results on job instance
Collect exit status
Exit with symbolic exit status
Interruptible Job Harness
Inform the job owner that a job completed, hand over the result
Job ControlSuspend (SIGTSTP)Resume (SIGCONT)Terminate (SIGTERM)Kill (SIGKILL)
Job Exited
This process is a fork() of the main process without execve().This means it has access to the main process data model at the time of the fork(), any modifications made after this point are copy-on-write, and any side effects of the job need to be manually propagated back to the main process through the IPC.