Say I wanted to create a program that prompts for a password (or does any other thing) when a user tries to open a certain file from the shell. How would you have a program monitor for that? I'm not asking for any code, just a "how-could-that-be-done". C++.