share and windows vs unix

For the Compleat Fan
Locked
Jeff
Posts: 604
Joined: Sat Apr 07, 2007 2:23 pm
Location: Ohio
Contact:

share and windows vs unix

Post by Jeff »

In the newlisp docs for share, it says that share can be used between parent/child processes. I thought that meant just forks. But share works in windows, and fork is not available in windows. However, using the int (memory address) returned by share between processes created using (process) in windows does not work. Am I missing something?
Jeff
=====
Old programmers don't die. They just parse on...

Artful code

Lutz
Posts: 5289
Joined: Thu Sep 26, 2002 4:45 pm
Location: Pasadena, California
Contact:

Post by Lutz »

On Win32 'share' does not return a memory address but a Win32 handle (HWND), which is not a memory address (see newlisp_manual.html for 'share').

Because of this 'share' on Win32 works only together with 'share' in the other process. Only on Unix 'share' returns a real and usable memory address.

Peter (pjot) wrote a winfork: http://www.turtle.dds.nl/newlisp/winfork.lsp
which can be used to run programs using 'share' and 'semaphore' and also runs newlisp-x.x.x/examples/prodcons.lsp . The winfork program was made for newLISP 8.8, when source did not have an extra context parameter, but I think it still should work.

Locked