You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I don't know if that's an issue but I noticed that truncating the logfile (the redirected STDOUT) doesn't work, at least the way expected. When doing
echo '' > out.log
ls -l out.log
ls still shows the old filesize. df shows the diskspace being freed. The logfile contains somehow invisible characters. It seems the open file should be rewinded or seek the beginning again. I work around this with this code at the moment:
I don't know what logrotate does exactly. I suppose it moves the old file an expects the process to then write to the new file. But for that the process must repoen the file otherwise the process continues to write to the old file. unicorn does this for example on USR1 (see http://unicorn.bogomips.org/SIGNALS.html). The problem is that trapping a signal overrides old traps. So just using one signal (say USR1) could collide with app specific traps. I've no idea how to solve this in a general way. :(
I don't know if that's an issue but I noticed that truncating the logfile (the redirected STDOUT) doesn't work, at least the way expected. When doing
ls
still shows the old filesize.df
shows the diskspace being freed. The logfile contains somehow invisible characters. It seems the open file should be rewinded or seek the beginning again. I work around this with this code at the moment:To reproduce see https://gist.github.com/1564418
The text was updated successfully, but these errors were encountered: