[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: savelog and restarting daemons

On Fri, 6 Jun 1997, Andreas Jellinghaus wrote:

> can someone explain to me the background, why daemons (some, not all)
> are SIGHUP'ed or restarted, after their log files are rotated and what
> happends in the daemons code (what has to happen). and what would
> happen, if the logfile is moved and no SIGHUP is done.

 The filename of a file is only used when opening the file. Once the file
is opened the kernel refer to the `inode'. If you move the file you are
just giving another name to acces that inode and removing the old one. If
you delete the filename, the file itself (the inode) remains `alive' until
every process end using the file.
 If you have a daemon with a 20Mb logfile and want to save space, it isn't
enough to delete the file... The file will still exist on disk as long as
the process has it opened..!
 The only way to break this connection is by using close/open...

Nicolás Lichtmaier.-

TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
debian-devel-request@lists.debian.org .
Trouble?  e-mail to templin@bucknell.edu .

Reply to: