View Single Post
  #46   Report Post  
Posted to uk.d-i-y
Alan Braggins Alan Braggins is offline
external usenet poster
 
Posts: 569
Default That's hard work for an electrician.

In article , Tim Streater wrote:
In article ,
Martin Bonner wrote:
On Wednesday, April 30, 2014 9:14:22 AM UTC+1, Tim Streater wrote:
In article , The Natural Philosopher
wrote:

Now Emacs takes the original file adds a tilde to it an creates a new
one of the original name. Vi takes the old file and alters it.
Result is, if a process has the file open emacs doesn't actually change
the working file contents.

You haver to restart the whole daemon. Which he failed to do of course.

Don't you have to do that anyway, however you edit it?


No. You send the daemon a SIGHUP and it rereads. If it rereads by rewinding
the existing filehandle and rereading (rather than reopening the file name),
the filehandle will be a handle to the *old* file.

I have to say, keeping the config file open seems barking to me.


That *is* barking.

And that presupposes that there *is* a way to send a SIGHUP. On Win7 I
couldn't find a way to do that for apache. So no obvious way to rotate
apache's log files.


TNP did say _Unix_ configuration files, even if what he meant was
apparently configuration files for one specific daemon which had barking
config file handling. Obviously well behaved daemons don't care what
editor you use.