Stephen Hahn wrote: >> There's an outstanding bug on this; the fix is trivial--use >> logadm(1M)'s copy-truncate option. > > 6578671 smf services keep logging to old smf logs after log > rotation as well, until we restart them > > I peeked at this bug when fixes were being discussed; a small patch > to svc.startd(1M) to set stdout/stderr to O_APPEND would make for a > complete fix.
logadm -c isn't atomic; if somebody writes to the log after the copy and before the truncate, the write will be lost. Nico and I were toying with the idea of a system call that would update existing file structures, replacing their old target vnode with a new one. He thinks this would solve other interesting problems (which he will elaborate on). I've put some notes on the matter in the CR.