Mac keychain an C++

What is the easiest way to write a command in C++ that detects if the mac keychain pops up. I want to write something along the lines of:

1
2
3
4
if(keychain.isActive(){
//delete a certain file;
}


I'm having an issue on some work machines that is creating keychain problems when a user changes the password on our network.

Thanks in advance for any suggestions
Topic archived. No new replies allowed.