Add running flag and add draft C wrapper function to start a monitor.