Re: [fpc-pascal] Inter-process communication, a cautionary tale

2012-07-22 Thread Mark Morgan Lloyd
Michael Van Canneyt wrote: On Sun, 22 Jul 2012, Mattias Gaertner wrote: On Wed, 18 Jul 2012 17:15:20 +0200 (CEST) michael.vancann...@wisa.be wrote: [...] I meant the SimpleIPC unit from the FCL: http://lazarus-ccr.sourceforge.net/docs/fcl/simpleipc/index.html Is there a simple two way IPC?

Re: [fpc-pascal] Inter-process communication, a cautionary tale

2012-07-22 Thread Michael Van Canneyt
On Sun, 22 Jul 2012, Mattias Gaertner wrote: On Wed, 18 Jul 2012 17:15:20 +0200 (CEST) michael.vancann...@wisa.be wrote: [...] I meant the SimpleIPC unit from the FCL: http://lazarus-ccr.sourceforge.net/docs/fcl/simpleipc/index.html Is there a simple two way IPC? It seems the '/tmp' direc

Re: [fpc-pascal] Inter-process communication, a cautionary tale

2012-07-21 Thread Mattias Gaertner
On Wed, 18 Jul 2012 17:15:20 +0200 (CEST) michael.vancann...@wisa.be wrote: >[...] > I meant the SimpleIPC unit from the FCL: > http://lazarus-ccr.sourceforge.net/docs/fcl/simpleipc/index.html Is there a simple two way IPC? It seems the '/tmp' directory is always used by simpleipc under unix. Ho

Re: [fpc-pascal] Inter-process communication, a cautionary tale

2012-07-20 Thread Marco van de Voort
In our previous episode, waldo kitty said: > > However I always think of named > > pipes, threads etc. as being primarily OS/2 v1 innovations, although some > > might > > have been introduced by the obscure Microsoft OS usually referred to as > > "European MS-DOS v4.0". > > for some reason i was

Re: [fpc-pascal] Inter-process communication, a cautionary tale

2012-07-20 Thread Mark Morgan Lloyd
waldo kitty wrote: FWIW: DOS does have and has had pipes... otherwise things like DIR | MORE would not work... maybe you mean named pipes? ;) Yes, I do. And I'm obviously aware that there are plenty of addons that graft named pipes (and mailslots etc.) onto DOS. i never used any of that..

Re: [fpc-pascal] Inter-process communication, a cautionary tale

2012-07-20 Thread waldo kitty
On 7/19/2012 03:12, Mark Morgan Lloyd wrote: waldo kitty wrote: On 7/18/2012 08:48, Mark Morgan Lloyd wrote: I was reminded of this when somebody was asking about portable signalling APIs the other day, but I think it's also relevant to discussion of e.g. how to pass a keyword to a help viewer.

Re: [fpc-pascal] Inter-process communication, a cautionary tale

2012-07-19 Thread OBones
Mark Morgan Lloyd wrote: OBones wrote: Mark Morgan Lloyd wrote: Basically, what I was trying to do was this. In the main thread: fIpcPipe:= CreateNamedPipe(PChar(fIpcName), PIPE_ACCESS_INBOUND, PIPE_TYPE_MESSAGE + PIPE_READMODE_MESSAGE,

Re: [fpc-pascal] Inter-process communication, a cautionary tale

2012-07-19 Thread Mark Morgan Lloyd
waldo kitty wrote: On 7/18/2012 08:48, Mark Morgan Lloyd wrote: I was reminded of this when somebody was asking about portable signalling APIs the other day, but I think it's also relevant to discussion of e.g. how to pass a keyword to a help viewer. I am obviously aware of the fact that FPC

Re: [fpc-pascal] Inter-process communication, a cautionary tale

2012-07-18 Thread Mark Morgan Lloyd
Michael Van Canneyt wrote: I meant the SimpleIPC unit from the FCL: http://lazarus-ccr.sourceforge.net/docs/fcl/simpleipc/index.html Because I was exploring various unix-domain socket aspects including mtu, where they're put, how to recover if an inactive one's already there (e.g. gdb failur

Re: [fpc-pascal] Inter-process communication, a cautionary tale

2012-07-18 Thread Michael Van Canneyt
On Wed, 18 Jul 2012, Mark Morgan Lloyd wrote: michael.vancann...@wisa.be wrote: On Wed, 18 Jul 2012, Mark Morgan Lloyd wrote: michael.vancann...@wisa.be wrote: No need to apologize, I'm just curious where you got your info from. The implementation has been the same since day 1, which mean

Re: [fpc-pascal] Inter-process communication, a cautionary tale

2012-07-18 Thread Mark Morgan Lloyd
michael.vancann...@wisa.be wrote: On Wed, 18 Jul 2012, Mark Morgan Lloyd wrote: michael.vancann...@wisa.be wrote: No need to apologize, I'm just curious where you got your info from. The implementation has been the same since day 1, which means your statement puzzles me. So instead of re-i

Re: [fpc-pascal] Inter-process communication, a cautionary tale

2012-07-18 Thread Mark Morgan Lloyd
OBones wrote: Mark Morgan Lloyd wrote: Basically, what I was trying to do was this. In the main thread: fIpcPipe:= CreateNamedPipe(PChar(fIpcName), PIPE_ACCESS_INBOUND, PIPE_TYPE_MESSAGE + PIPE_READMODE_MESSAGE, 1, 0, 0, 1000, NIL (* @

Re: [fpc-pascal] Inter-process communication, a cautionary tale

2012-07-18 Thread michael . vancanneyt
On Wed, 18 Jul 2012, Mark Morgan Lloyd wrote: michael.vancann...@wisa.be wrote: No need to apologize, I'm just curious where you got your info from. The implementation has been the same since day 1, which means your statement puzzles me. So instead of re-inventing the wheel, maybe have a

Re: [fpc-pascal] Inter-process communication, a cautionary tale

2012-07-18 Thread OBones
Mark Morgan Lloyd wrote: Basically, what I was trying to do was this. In the main thread: fIpcPipe:= CreateNamedPipe(PChar(fIpcName), PIPE_ACCESS_INBOUND, PIPE_TYPE_MESSAGE + PIPE_READMODE_MESSAGE, 1, 0, 0, 1000, NIL (* @sa *) ); That

Re: [fpc-pascal] Inter-process communication, a cautionary tale

2012-07-18 Thread Mark Morgan Lloyd
michael.vancann...@wisa.be wrote: No need to apologize, I'm just curious where you got your info from. The implementation has been the same since day 1, which means your statement puzzles me. So instead of re-inventing the wheel, maybe have a closer look again at the standard IPC mechanisms.

Re: [fpc-pascal] Inter-process communication, a cautionary tale

2012-07-18 Thread Mark Morgan Lloyd
OBones wrote: Mark Morgan Lloyd wrote: A couple of weeks ago, out of curiosity rather than necessity, I started looking at whether the library could be ported to Windows using MS-style named pipes. However I seem to have hit a snag since it appears that Windows can't both create a named pipe (

Re: [fpc-pascal] Inter-process communication, a cautionary tale

2012-07-18 Thread michael . vancanneyt
On Wed, 18 Jul 2012, Mark Morgan Lloyd wrote: michael.vancann...@wisa.be wrote: On Wed, 18 Jul 2012, Mark Morgan Lloyd wrote: I was reminded of this when somebody was asking about portable signalling APIs the other day, but I think it's also relevant to discussion of e.g. how to pass a key

Re: [fpc-pascal] Inter-process communication, a cautionary tale

2012-07-18 Thread Mark Morgan Lloyd
michael.vancann...@wisa.be wrote: On Wed, 18 Jul 2012, Mark Morgan Lloyd wrote: I was reminded of this when somebody was asking about portable signalling APIs the other day, but I think it's also relevant to discussion of e.g. how to pass a keyword to a help viewer. I am obviously aware of t

Re: [fpc-pascal] Inter-process communication, a cautionary tale

2012-07-18 Thread michael . vancanneyt
On Wed, 18 Jul 2012, Mark Morgan Lloyd wrote: I was reminded of this when somebody was asking about portable signalling APIs the other day, but I think it's also relevant to discussion of e.g. how to pass a keyword to a help viewer. I am obviously aware of the fact that FPC has an IPC unit

Re: [fpc-pascal] Inter-process communication, a cautionary tale

2012-07-18 Thread OBones
Mark Morgan Lloyd wrote: A couple of weeks ago, out of curiosity rather than necessity, I started looking at whether the library could be ported to Windows using MS-style named pipes. However I seem to have hit a snag since it appears that Windows can't both create a named pipe (for reading) an

[fpc-pascal] Inter-process communication, a cautionary tale

2012-07-18 Thread Mark Morgan Lloyd
I was reminded of this when somebody was asking about portable signalling APIs the other day, but I think it's also relevant to discussion of e.g. how to pass a keyword to a help viewer. I am obviously aware of the fact that FPC has an IPC unit which uses a temporary file, although I have alwa