add trivial main loop implementation with sysv ipc