Sending signal to child process
First of all hello, (this is my first post)
I'm using a daemon which takes requests (fetces rows) from a database and then starts an rsync (remote synchronization tool provided by samba) with the exec() command. I want to add a feature so that the daemon can stop (kill -STOP) an rsync process and then continue later (kill -CONT).
The Tree is like this:
\_forked-process (known pid)
\__Rsync-process (executed using exec command, unknown pid)
My problem is that after executing the exec command inside the forked-process the pid of the rsync-process is unknown (exec() does not return the pid) so I don't know it's value to stop it later...
Any help appreciated
Thanks for your time & sorry for my bad english