|
From: Malcolm T. <ma...@co...> - 2002-10-02 08:15:35
|
Hi Benjamin, On Wed, Oct 02, 2002 at 09:58:37AM +0200, Benjamin Thery wrote: > Some days ago, I reported the following bug for Scrollkeeper (see below). > I think this is a major problem if there is more than one user or more > than one GNOME 2 installation on the same host. > > I hope this could be fixed soon. Thanks for the bug report. You are correct, the problem will happen exactly as you have observed and it is most likely to be triggered in scenarios like yours where there are multiple users on the same system. As for fixing it, there are two possibilities (and this is the part where I keep hoping that other people on the list might comment on my ideas): (1) We use mkstemp to generate a unique filename each time (and include our own implementation for use on systems that don't have mkstemp). Advantages: - Avoids the recent security problem (which is fixed in CVS, btw). - Gets around the "maximum of five files" problem. Disadvantages: - There is going to be a metric truckload of files with stupid names floating around in some subdirectory of the tmp directory after a while. In reality, these are never going to be cleaned up except by something like tmpwatch (which is not frequent enough on, say, Linux systems). (2) The scrollkeeper-get-cl binary dumps the result to stdout, rather than saving to a file. Advantages: - Never have to worry about stray files lying around. - Makes scrollkeeper easily multiuser without having to sweat on a lot of the locking issues all the time. Disadvantages: - Breaks backwards compatibility. All applications currently using scrollkeeper via scrolkeeper-get-cl and friends. Although option (2) seems clearly preferable to me, the backwards compatibility issues means it is probably an 0.5 feature. This means we may have to go with the "dozens of stupid temporary" files in the 0.3/0.4 timeframe unless somebody can come up with a better idea. Anybody have thoughts? Malcolm |