[PATCH 1/5] server: Add a foreground flag to the thread input shared memory.