solution in Linux? how sintaxe used?
:)
Alexsander Rosa escreveu:
> The /var/run solution is almost canonic for Linux.
> But how to do this in a multi-platform way?
>
> 2006/10/3, Ales Katona <[EMAIL PROTECTED]>:
>> /var/run with pids is also present in FreeBSD 5.x+
>>
>> But it's just a dumpspa
The /var/run solution is almost canonic for Linux.
But how to do this in a multi-platform way?
2006/10/3, Ales Katona <[EMAIL PROTECTED]>:
/var/run with pids is also present in FreeBSD 5.x+
But it's just a dumpspace for these things..
It still doesn't add anything useful :) I think there's som
/var/run with pids is also present in FreeBSD 5.x+
But it's just a dumpspace for these things..
It still doesn't add anything useful :) I think there's some syscall to
do what "ps" does basicly. Might be worth looking at, that way you won't
depend on external crap.
Ales
> At least FreeBSD 4 has
Am Montag, den 02.10.2006, 17:51 +0200 schrieb Ales Katona:
> FreeBSD might or might not have /proc mounted. Default is no however, so
> you can't be sure.
>
> However you can still save the pid # of the process in some file, then
> when starting a new one, read this number, check output of ps (or
FreeBSD might or might not have /proc mounted. Default is no however, so
you can't be sure.
However you can still save the pid # of the process in some file, then
when starting a new one, read this number, check output of ps (or use
syscalls if applicable) for given number and if "pos" finds the n
Am Montag, 2. Oktober 2006 16:13 schrieb Al Boldi:
> Burkhard Carstens wrote:
> > Am Donnerstag, 28. September 2006 22:41 schrieb John vd Waeter:
> > > Problem when program crashes. File is not deleted. Maybe refresh
> > > file every 5 minutes or so, put a timestamp in it. If timestamp
> > > older
Burkhard Carstens wrote:
> Am Donnerstag, 28. September 2006 22:41 schrieb John vd Waeter:
> > Problem when program crashes. File is not deleted. Maybe refresh file
> > every 5 minutes or so, put a timestamp in it. If timestamp older then
> > 5 minutes, program appearantly crashed, new instance may
Thanks for your help!-- Lucas BaldrésUsuario linux #: 425616Maquina #: 333252
Am Donnerstag, 28. September 2006 22:41 schrieb John vd Waeter:
> Problem when program crashes. File is not deleted. Maybe refresh file
> every 5 minutes or so, put a timestamp in it. If timestamp older then
> 5 minutes, program appearantly crashed, new instance may start.
>
> John
Put you PID in
2006/9/28, A.J. Venter <[EMAIL PROTECTED]>:
Just a simple question: would that be possible to simply query the
> list of actual processes that are running? 'ps ax' for example; then
> you can find your application?
Yep, you could do this with a TProcess - however, having said that - as
I said bef
Just a simple question: would that be possible to simply query the
list of actual processes that are running? 'ps ax' for example; then
you can find your application?
Yep, you could do this with a TProcess - however, having said that - as
I said before when this same question was discussed - the
2006/9/28, Bogusław Brandys <[EMAIL PROTECTED]>:
Graeme Geldenhuys wrote:
Well.The main problem with linux in this particular case is that it's
hard to find such global resource which is:
- atomic (no other process can get it in the same time like file lock or
system-wide mutex)
- automatically r
On 28/09/06, Bogusław Brandys <[EMAIL PROTECTED]> wrote:
According to pthreads docs: "Mutexes can be applied only to threads in a
single process and do not work between processes as do semaphores."
Maybe semaphores are right solution ?
Could this help? It is global to processes, and not just
Graeme Geldenhuys wrote:
On 28/09/06, John vd Waeter <[EMAIL PROTECTED]> wrote:
Problem when program crashes. File is not deleted. Maybe refresh file
every 5 minutes or so, put a timestamp in it. If timestamp older then 5
minutes, program appearantly crashed, new instance may start.
John
Sim
Graeme Geldenhuys wrote:
> On 28/09/06, John vd Waeter <[EMAIL PROTECTED]> wrote:
>> Problem when program crashes. File is not deleted. Maybe refresh file
>> every 5 minutes or so, put a timestamp in it. If timestamp older then 5
>> minutes, program appearantly crashed, new instance may start.
>>
>
Graeme Geldenhuys wrote:
On 28/09/06, John vd Waeter <[EMAIL PROTECTED]> wrote:
Problem when program crashes. File is not deleted. Maybe refresh file
every 5 minutes or so, put a timestamp in it. If timestamp older then 5
minutes, program appearantly crashed, new instance may start.
John
Sim
On 28/09/06, John vd Waeter <[EMAIL PROTECTED]> wrote:
Problem when program crashes. File is not deleted. Maybe refresh file
every 5 minutes or so, put a timestamp in it. If timestamp older then 5
minutes, program appearantly crashed, new instance may start.
John
Simple solution, program with
Problem when program crashes. File is not deleted. Maybe refresh file
every 5 minutes or so, put a timestamp in it. If timestamp older then 5
minutes, program appearantly crashed, new instance may start.
John
Bogusław Brandys wrote:
Alejandro Lucas Baldres wrote:
My plataform i386 with Linu
ik wrote:
Another way, that is easier to control, is to use mutexes.
Mutex is a place in memory that is locked until someone free it. So
you can check if that place (usually mapped to a name, alto I do not
remember at the moment how Linux implement it) exists, and if so, you
stop your own executi
Another way, that is easier to control, is to use mutexes.
Mutex is a place in memory that is locked until someone free it. So
you can check if that place (usually mapped to a name, alto I do not
remember at the moment how Linux implement it) exists, and if so, you
stop your own execution, otherwi
Alejandro Lucas Baldres wrote:
My plataform i386 with Linux (ubuntu dapper 6.06), the future of program
is free and opensource.
I want the program disallow more then one instance.
The simplest solution: let program check if /tmp/ file exists
and create it,then on exit delete.If file exists th
My plataform i386 with Linux (ubuntu dapper 6.06), the future of program is free and opensource.I want the program disallow more then one instance.2006/9/28, Bogusław Brandys <
[EMAIL PROTECTED]>:Alejandro Lucas Baldres wrote:
> Hello, I'm buy a program, this no can allow more of a instance. ¿How t
Alejandro Lucas Baldres wrote:
Hello, I'm buy a program, this no can allow more of a instance. ¿How to
for no allow more of one instance?
Thank you and sorry for my bad english
--
Lucas Baldrés
Usuario linux #: 425616
Maquina #: 333252
Try to describe in simpler words :)
Which platform ? Lin
Hello, I'm buy a program, this no can allow more of a instance. ¿How to for no allow more of one instance?Thank you and sorry for my bad english-- Lucas BaldrésUsuario linux #: 425616
Maquina #: 333252
24 matches
Mail list logo