Lockfiles have their own problems but don't any better option.  IPC is an
option but it's got worse problems.

How about a time-delayed lockfile that prevents running a copy of Tux
Paint for 30 seconds from the last launch attempt?  That prevents
excessive clicks, but most problems caused by lockfiles (like stale lock
files) go away.

A couple issues I see:

   1. Locking files via flock() over the network doesn't work.

   2. We can find ways around #1, but we gotta be careful not to lock
      out everyone else on the network with a bad work-around.

Just my 2 cents!

-Mark


On Wed, 11 Aug 2004, Bill Kendrick wrote:

> I've been asked:
> >
> > Is there any way to check to see of tuxpaint is already running
> > before launching it again?  Maybe prompt 'Tux Paint is already
> > running, do you really want to run it again?'  My kids get so
> > excited about getting into it, they just keep clicking!  Sometimes
> > it is running six times on one ancient desktop before they realize
> > what they've done.  It doesn't take too many of these hang ups for
> > most kids to get the idea, but some just don't figure out that
> > clicking will not make it load faster (special needs kids.)
>
> I'm imagining ways this could be done with a shell script, "ps" and
> kdialog or xmessage under Linux/Unix, but that's not exactly portable.
>
> Should we add some 'lockfile' code to the app itself?
>
> -bill!
> [EMAIL PROTECTED]            "Avoid missing ball for high score"
> http://www.newbreedsoftware.com/
> New Breed Software
> _______________________________________________
> Tuxpaint-dev mailing list
> [EMAIL PROTECTED]
> http://tux4kids.net/mailman/listinfo/tuxpaint-dev
>

-- 
Mark K. Kim
AIM: markus kimius
Homepage: http://www.cbreak.org/
Xanga: http://www.xanga.com/vindaci
Friendster: http://www.friendster.com/user.php?uid=13046
PGP key fingerprint: 7324 BACA 53AD E504 A76E  5167 6822 94F0 F298 5DCE
PGP key available on the homepage
_______________________________________________
Tuxpaint-dev mailing list
[EMAIL PROTECTED]
http://tux4kids.net/mailman/listinfo/tuxpaint-dev

Reply via email to