Update shm-ipc.md

Simplify the code a little. e.g. reduce nesting and options to the builder which don't change the outcome.