For a script running in flight-recorder-on-file mode, it may be desirable to designate the "current" flight recorder contents as precious, to be archived separately from the rotating log files. It could be just a request to rotate to the next file, or a request to save a snapshot of the current logs elsewhere. We should consider adding a tapset function (to send a special message to stapio), or some other mechanism (special variables to feed to a system(sprintf("cp %s %s", LOGFILE, ARCHIVEFILE)).
Moving log files will cause heavy i/o load, so I think just leaving current log files and opening new log file (series) is ok for some cases.
How about supporting 'dbus' messaging bus on stap? :-)
a { system(sprintf("kill -SIGUSR %d", stp_pid)) } might do the job
A new tapset function switch_file() provides this functionality.