On Monday 07 January 2008, Nicholas Leippe wrote: > On Saturday 05 January 2008, Doran L. Barton wrote: > > Your idea of modifying the configuration file and sending a signal to the > > main program to re-read its configuration is the first idea I had as I > > was reading your message. I wonder how much trouble it would be to simply > > add a periodic check in the main program to monitor the configuration > > file for changes. Without knowing the nature of the program, I can't > > really offer any advice on whether that would be a good approach or not > > but it might be something to consider. > > I would recommend requiring a signal. You don't want the program to pick up > partial changes that might occur if you're messing around with the file by > hand... Besides, polling is evil ;) >
However, if you were to implement a policy that guaranteed that the file is always complete (such as replacing the file rather than modifying it in-place), you could use inotify in the application to monitor it (w/o polling), and no longer need to signal it. /* PLUG: http://plug.org, #utah on irc.freenode.net Unsubscribe: http://plug.org/mailman/options/plug Don't fear the penguin. */
