Kind of crappy that we're spawning two processes (one to tail, one to watch), but I like this better than having the ComputeLogManager do the bookkeeping on all of the spawned tail processes and killing off orphaned ones.
- Group Reviewers
- R1:414df8099e03: Add compute logging watcher process to kill tail (and itself) if parent dies
bk, also ran the dagster-graphql multiprocessing test and saw that the crashed solid did
not orphan a tail process
i will never not think of fork as weird
I think this all comment worthy
# There are now two processes. The child process (indicated by the return value of os.fork being # zero) will run until the parent process has terminated. Only then will it terminate the tail # process, which otherwise would have been orphaned. The other branch occurs in the parent # process (where the actual solid computation is happening)