[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: Tor cleverness?

On Mon, Nov 17, 2008 at 06:54:49PM +0000, Geoff Down wrote:
> Hi,
> two questions:
> I renamed (with 'mv') the file I was sending Tor logs to whilst Tor was 
> running.
> I actually moved it to a different directory.
> The log data kept being written to that file. How?

Welcome to Unix. :)

A file on Unix exists independently of its location in the directory
hierarchy.  This is why you can have multiple "hard links" on the
filesystem all pointing to the same underlying file.  Programs that
have opened the file keep reading or writing to the same file even if
it is moved... or deleted.  For more information, look up "inodes".

If you want to rotate your logs, sent a HUP signal.  Tor will treat
this as a sign to close and reopen them, thereby creating new files if
you have moved the old ones away.

> Secondly, does sending a USR2 signal to Tor (r16744) switch on 
> debug level logging as stated in the manual? I've tried it and it seems 
> not to work - except I got some debug-level entries after I sent a 
> shutdown signal.

It should.  Looks like there was a bug; I've checked in a fix.