Right now the only way to stop a runaway report is to go in to the command line. It would be great if there were a button that the librarian could hit on the reports page to "kill" a report that's taking too long to run.
This is a pretty complicated process. I think it would require something likes this: a) Add a system preference "StopReports" ( or something similar ) and/or a new staff permission. b) When enabled, running a report would immediately send a partial html page with a "Stop Report" button at the top, along with the PID of the process that is generating the report. c) Clicking the "Stop Report" button would launch another script via ajax which sends the PID to a new script that does nothing but kill processes. d) The script would attempt to kill the process generating the report and send back a confirmation to the requester. e) If the processes cannot be killed, the web page would pop up an alert, if the process was killed successfully, the page would redirect back to the report that had been run.
While technically it could be done, I don't think it would be a reasonable thing to do. -- That said, an interesting alternative could be to use BackgroundJobs and to have a maximum execution time allowed for a job where the worker kills its child process if it exceeds the maximum execution time.