Chris wrote:
>
> I'm using php3 and have encountered the following problem: I am locking my
> mysql tables using 'lock tables' and would like to be able to unlock the
> tables if the user hits the stop button before my php script calls 'unlock
> tables'. Does anyone know the solution to this problem? Currently when
> this happens I have to manually kill the offending processes listed by
> 'show processlist'.
>
> --Chris
>
Can PHP trap signals? Trapping a signal would be the
only way to do something when the user hits the stop
button. If not, you have several options:
1) Hack PHP to add the signal trapping functionality.
Should not be super hard.
2) Do not lock the tables, and think of a some trick to
ensure table integrity
3) Use a language that can trap signals for the part of
the code in question. My understanding is that you can
load a shared library and call C functions from PHP.
--
Sasha Pachev
http://www.sashanet.com/ (home)
http://www.direct1.com/ (work)