I made a program using fork()
and exec*()
. The problem is I can't determine success or failure of exec()
from parent process because it's on separated child process. I think kind of signaling can be used to check this state, but I have no idea about this.
- What's the recommended/standard/widely-used way to check this?
- And what's the pitfalls that I have to care about while doing this?
Question Detail Update (Sorry for omission of important detail)
I want to keep both processes are running so I can't just wait exiting of child process. In other words, I want to be notified about the child process' exec
success or failure.