I recently wrote a daemon in c++ that backs up certain folders by periodically copying a directory (and its contents) on my computer to an external flash drive. So far I can only back up one directory with a specific fixed path that I set in my source code. I would like to be able to pass an argument from another process to the daemon, while it is running, to change the path of the directory I want to backup. I have done research on signals like kill(), but I do not think that they are the correct kind of inter-process communication for my specific application.
Any help or direction as to how I should accomplish this task is greatly appreciated.
You need to use
pipesor shared memory see poping 2 processes