having more than one process write to one log

Philip Hallstrom freebsd at philip.pjkh.com
Thu Oct 19 18:14:32 UTC 2006


> I will appreciate your advice. Is it possible and *safe* to allow two 
> different processes (dovecot and exim) to write to one log? Better not do it? 
> I would like to have both data in one log but... don't want to cause 
> problems. I don't think Windows would allow it. How about FBSD?

fopen() seems to say it's okay...

 		 ``a''   Open for writing.  The file is created if it does not
exist.  The stream is positioned at the end of the file.  Subsequent
writes to the file will always end up at the then current end of file,
irrespective of any intervening fseek(3) or similar.


Another idea is to use syslog....

-philip


More information about the freebsd-questions mailing list