Comment PTRACE is magic (Score 1) 2362
I once had to admin a system that used some software that kept its own log file and wouldn't roll the log file. The software had to keep running non-stop but its logs were so verbose that eventually it started filling up the disk and kept the log files open so you couldn't cleanly swap out the disk even.
solution: small gdb script to attach to the daemon and open/create a new file at the proper place dup2() the file handle with a new (closing the old), and then detach and bzip the old file...
PTRACE is magic.