added the IOCTL cmds menu, tested and working. Also added the app termination signal handlers that make sure all reader or writers are closed when the app is close normally or with ctrl-c. Code is repetitive and a bit messy, but working