title: How to log all commands run By system() System Call
body: <p>I am trying to debug a C++ application which invokes many command line applications such as grep, etc through a the system() system call. I need to see all the commands the application is executing through the system() call.</p>
  
  <p>I tried to view these commands by enabling history and view the .history file. But these commands are not executed through a terminal. The history file has only the commands executed interactively. </p>
  
  <p>Any idea how this can be done?</p>