While I worked on my OpenTTD container, I came to the challenge of wrapping a process for initial and final input and output, and temporarily guarding it from interrupt signals. This is my solution.

This is a template. Feel free to replace PROCESS, "START" and "END" as you like.

diagram