Recent

Author Topic: How stoped starting program two times?  (Read 14469 times)

Fortuna1

  • Full Member
  • ***
  • Posts: 164
How stoped starting program two times?
« on: December 18, 2007, 11:37:44 am »
Linux suse 10.0.
fpc-2.2.0-0.i386.rpm
lazarus-0.9.22-0.i386.rpm


Thanks.

antonio

  • Hero Member
  • *****
  • Posts: 605
RE: How stoped starting program two times?
« Reply #1 on: December 18, 2007, 02:14:18 pm »
Which program?

Fortuna1

  • Full Member
  • ***
  • Posts: 164
Re: RE: How stoped starting program two times?
« Reply #2 on: December 18, 2007, 08:46:35 pm »
Quote from: "antonio"
Which program?


My program write in Lazarus.

antonio

  • Hero Member
  • *****
  • Posts: 605
RE: Re: RE: How stoped starting program two times?
« Reply #3 on: December 18, 2007, 09:33:38 pm »
What is happening with it?

arnoldb

  • Jr. Member
  • **
  • Posts: 97
RE: Re: RE: How stoped starting program two times?
« Reply #4 on: December 19, 2007, 07:26:30 am »
If you mean "how to stop your application from starting and running two times", see http://wiki.lazarus.freepascal.org/UniqueInstance

Fortuna1

  • Full Member
  • ***
  • Posts: 164
Re: RE: Re: RE: How stoped starting program two times?
« Reply #5 on: December 19, 2007, 10:46:05 pm »
Success (':D')
UniqueInstanece wonderful working.

Thanks very much  arnoldb!

Fortuna1

  • Full Member
  • ***
  • Posts: 164
Re: RE: Re: RE: How stoped starting program two times?
« Reply #6 on: December 20, 2007, 10:18:14 am »
I install  UniqueInstance.

Problem is :

How  starting program?

I try this:

1) I starting program and then I turn off  computer, without  close program.
2) I turn on computer and try runing  program.
3) Program not starting
How starting program in these case.

antonio

  • Hero Member
  • *****
  • Posts: 605
RE: Re: RE: Re: RE: How stoped starting program two times?
« Reply #7 on: December 20, 2007, 04:39:42 pm »
You can use UniqueInstance if you want to prevent your program to execute more than once. It will not execute twice or more at the same time.

Fortuna1

  • Full Member
  • ***
  • Posts: 164
Re: RE: Re: RE: Re: RE: How stoped starting program two tim
« Reply #8 on: December 20, 2007, 05:20:09 pm »
Quote from: "antonio"
You can use UniqueInstance if you want to prevent your program to execute more than once. It will not execute twice or more at the same time.


Yes, UniqueInstance prevent  execute more than once.

But.
if Turn off electricity betweeentimes  execute program
and then restart computer.

It will not execute once.
UniqueInstance prevent  all execute;

Program  stop and not execute.

How execute program one times after
reboot  computer.

How reset  UniqueInstance prevent?


Thanks.

antonio

  • Hero Member
  • *****
  • Posts: 605
RE: Re: RE: Re: RE: Re: RE: How stoped starting program two
« Reply #9 on: December 20, 2007, 06:17:03 pm »
Wow, it seems that you found a bug somewhere!! I will try to do this you report.

antonio

  • Hero Member
  • *****
  • Posts: 605
RE: Re: RE: Re: RE: Re: RE: How stoped starting program two
« Reply #10 on: December 20, 2007, 06:28:57 pm »
No, I can't reproduce this issue on Widows XP.

pch

  • Jr. Member
  • **
  • Posts: 51
    • http://ap-i.net
RE: Re: RE: Re: RE: Re: RE: How stoped starting program two
« Reply #11 on: December 21, 2007, 04:02:49 pm »
I also have this problem but on Linux only.
The reason is simpleipc used by UniqueInstance create a pipe in /tmp/ . This file is not removed until you cleanly close the program.
So if the program crash or if you cut the power you have to remove the file before you can start the program again.

antonio

  • Hero Member
  • *****
  • Posts: 605
RE: Re: RE: Re: RE: Re: RE: How stoped starting program two
« Reply #12 on: December 21, 2007, 04:17:53 pm »
The author is Luiz Américo. You could send him a private message.

Fortuna1

  • Full Member
  • ***
  • Posts: 164
Re: RE: Re: RE: Re: RE: Re: RE: How stoped starting program
« Reply #13 on: December 21, 2007, 09:46:42 pm »
Quote from: "pch"
have to remove the file before you can start the program again.

Yes, these is OK.

Thanks.

Quote from: "antonio"

The author is Luiz Américo. You could send him a private message.

Yes. I send message.

Thanks.

My best regards from Slovenia.

bonmario

  • Sr. Member
  • ****
  • Posts: 346
Re: RE: Re: RE: Re: RE: Re: RE: How stoped starting program
« Reply #14 on: January 09, 2008, 09:42:08 am »
Quote from: "pch"
I also have this problem but on Linux only.
The reason is simpleipc used by UniqueInstance create a pipe in /tmp/ . This file is not removed until you cleanly close the program.
So if the program crash or if you cut the power you have to remove the file before you can start the program again.


Do you know wich is the name of this file?

Thanks, Mario

 

TinyPortal © 2005-2018