Re: [fpc-pascal] Operator overloading

2009-09-21 Thread Jonas Maebe
On 19 Sep 2009, at 22:21, Mark Morgan Lloyd wrote: Is there any way of overloading the ^ (dereference) operator for a user-defined type? No, it isn't. Jonas ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/m

Re: [fpc-pascal] getting started with threads

2009-09-21 Thread Marco van de Voort
In our previous episode, Jonas Maebe said: > > I use own lockfree FIFO http://www.emadar.com/fpc/lockfree.htm to > > distribute task between threads > > its much faster and well scaling on multicore. > > Note that it won't work as is on non-x86 machines, because it's > missing memory barriers

[fpc-pascal] Checking Linux process existence (child or not) without OS command ?

2009-09-21 Thread T. Guilleminot
Hi, Does anyone know a simple way to check if a Linux process exists/runs (child or not) *without* running an OS command via TProcess (or other)? Thanks. Tom ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailma

Re: [fpc-pascal] Checking Linux process existence (child or not) without OS command ?

2009-09-21 Thread Jonas Maebe
On 21 Sep 2009, at 14:58, T. Guilleminot wrote: Does anyone know a simple way to check if a Linux process exists/runs (child or not) *without* running an OS command via TProcess (or other)? How do you want to identify this process? By name, by pid, ...? Jonas _

Re: [fpc-pascal] Checking Linux process existence (child or not) without OS command ?

2009-09-21 Thread David W Noon
On Mon, 21 Sep 2009 14:58:20 +0200 (CEST), T. Guilleminot wrote about [fpc-pascal] Checking Linux process existence (child or not) without OS command ?: > Does anyone know a simple way to check if a Linux process exists/runs > (child or not) *without* running an OS command via TProcess (or > other

Re: [fpc-pascal] Checking Linux process existence (child or not) without OS command ?

2009-09-21 Thread Henry Vermaak
2009/9/21 T. Guilleminot : > Hi, > > Does anyone know a simple way to check if a Linux process exists/runs > (child or not) *without* running an OS command via TProcess (or other)? You can read all the /proc/%d/cmdline files to search for a specific process. Henry

Re: [fpc-pascal] Checking Linux process existence (child or not) without OS command ?

2009-09-21 Thread Marco van de Voort
In our previous episode, Henry Vermaak said: > > Does anyone know a simple way to check if a Linux process exists/runs > > (child or not) *without* running an OS command via TProcess (or other)? > > You can read all the /proc/%d/cmdline files to search for a specific process. While it might work,

Re: [fpc-pascal] Checking Linux process existence (child or not) without OS command ?

2009-09-21 Thread Henry Vermaak
2009/9/21 Marco van de Voort : > In our previous episode, Henry Vermaak said: >> > Does anyone know a simple way to check if a Linux process exists/runs >> > (child or not) *without* running an OS command via TProcess (or other)? >> >> You can read all the /proc/%d/cmdline files to search for a spe

Re: [fpc-pascal] Checking Linux process existence (child or not) without OS command ?

2009-09-21 Thread T. Guilleminot
You mean by scanning /proc recursively ? 2009/9/21 T. Guilleminot : > Hi, > > Does anyone know a simple way to check if a Linux process exists/runs > (child or not) *without* running an OS command via TProcess (or other)? You can read all the /proc/%d/cmdline files to search for a specific proc

Re: [fpc-pascal] Checking Linux process existence (child or not) without OS command ?

2009-09-21 Thread T. Guilleminot
Thanks. May be more by name actually. On 21 Sep 2009, at 14:58, T. Guilleminot wrote: > Does anyone know a simple way to check if a Linux process exists/runs > (child or not) *without* running an OS command via TProcess (or > other)? How do you want to identify this process? By name, by pid, .

Re: [fpc-pascal] Checking Linux process existence (child or not) without OS command ?

2009-09-21 Thread fpclist
While scanning /proc may not be portable, the question asked is about checking for a running Linux process. The only way I know is scanning all directories within /proc (which as you all know are the id's of the running processes) and checking for the process file name and the process command li

Re: [fpc-pascal] Checking Linux process existence (child or not) without OS command ?

2009-09-21 Thread Henry Vermaak
2009/9/21 : > While scanning /proc may not be portable, the question asked is about checking > for a running Linux process. The only way I know is scanning all directories > within /proc (which as you all know are the id's of the running processes) > and checking for the process file name and the

Re: [fpc-pascal] Checking Linux process existence (child or not) without OS command ?

2009-09-21 Thread Graeme Geldenhuys
2009/9/21 Marco van de Voort : > > While it might work, it won't port well to other unices. Well, the original poster did mention a "Linux process", so there is probably no reason to port it to other unixes. Not all programs need to be portable to other OS's. Regards, - Graeme -

Re: [fpc-pascal] Operator overloading

2009-09-21 Thread Mark Morgan Lloyd
Jonas Maebe wrote: On 19 Sep 2009, at 22:21, Mark Morgan Lloyd wrote: Is there any way of overloading the ^ (dereference) operator for a user-defined type? No, it isn't. Shucks :-) I remember that JPI v1 had what they called "virtual pointers" which specified a dereference function and co