WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: FLIT time sound battery applet  (Read 18985 times)

Offline tinypoodle

  • Hero Member
  • *****
  • Posts: 3857
Re: FLIT time sound battery applet
« Reply #30 on: January 05, 2011, 01:55:34 AM »
-a and -d do not seem to have any effect with jwm-snapshot here.
Multiple instances do not appear to get prevented.
"Software gets slower faster than hardware gets faster." Niklaus Wirth - A Plea for Lean Software (1995)

Offline Jakob Bysewski

  • Newbie
  • *
  • Posts: 40
Re: FLIT time sound battery applet
« Reply #31 on: January 05, 2011, 09:00:29 AM »
Quote
Multiple instances do not appear to get prevented.
Do you have the flit version 1.3.0 beta1 or the one from the tc repository?
Check by running
Code: [Select]
flit -VIf you have the current version please look for a file .flit.pid in your home directory while flit is running and please tell me if it exists (it's contents should be a single number which is the process id of the running flit instance).

Offline tinypoodle

  • Hero Member
  • *****
  • Posts: 3857
Re: FLIT time sound battery applet
« Reply #32 on: January 05, 2011, 02:19:38 PM »
Code: [Select]
flit 1.3.0 Beta 1
Code: [Select]
tc@box:~$ ls -l .fli*
-rw-r--r--    1 tc       staff         972 Jan  4 13:01 .flit.conf
tc@box:~$

FWIW, running TC 2.10, but I doubt that would play any role.
"Software gets slower faster than hardware gets faster." Niklaus Wirth - A Plea for Lean Software (1995)

Offline Jakob Bysewski

  • Newbie
  • *
  • Posts: 40
Re: FLIT time sound battery applet
« Reply #33 on: January 07, 2011, 11:05:51 AM »
I cannot get to what I must be missing here - the file should be created when flit is started and deleted after flit has been canceled.

As there is no error checking in place, flit should even crash when it cannot write the pidfile... this seems strange.

Offline gerald_clark

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 4254
Re: FLIT time sound battery applet
« Reply #34 on: January 07, 2011, 11:26:35 AM »
Pid files in the home directory are probably a bad idea.
If you run a backup, and later shutdown without backup, you will be left with a pidfile in mydata.tgz.
This will cause a problem at reboot.

Some things to consider:
When checking for a pid file, make sure the pid is still running.  If not, delete it.
Store your pid files someplace else like /var/run.

Offline tinypoodle

  • Hero Member
  • *****
  • Posts: 3857
Re: FLIT time sound battery applet
« Reply #35 on: January 07, 2011, 01:52:38 PM »
If you run a backup, and later shutdown without backup, you will be left with a pidfile in mydata.tgz.

Good catch - a scenario particular to TC.
"Software gets slower faster than hardware gets faster." Niklaus Wirth - A Plea for Lean Software (1995)

Offline Jakob Bysewski

  • Newbie
  • *
  • Posts: 40
Re: FLIT time sound battery applet
« Reply #36 on: January 07, 2011, 03:13:29 PM »
It is checked if the pid in the pidfile is valid and an instance of flit!
If not, the pidfile is replaced upon start -> so that is not an issue.

At first I wanted to put the pidfile into /var/run but did not do it because of missing access rights. But it couild be put under /tmp/ instead.

Offline tinypoodle

  • Hero Member
  • *****
  • Posts: 3857
Re: FLIT time sound battery applet
« Reply #37 on: January 07, 2011, 04:03:18 PM »
Doing some more testing, indeed I did find .flit.pid - no idea why I didn't before.

When running new instances, the content appears to be overwritten with PID of most recent instance.

After exiting the most recent of multiple instance, it's (no longer existing) PID would remain in the file.
"Software gets slower faster than hardware gets faster." Niklaus Wirth - A Plea for Lean Software (1995)

Offline Jakob Bysewski

  • Newbie
  • *
  • Posts: 40
Re: FLIT time sound battery applet
« Reply #38 on: January 07, 2011, 04:32:54 PM »
Okay, thanks for this input which will hopefully give me some hint to find the problem.