share and windows vs unix

Started by Jeff, March 19, 2008, 04:24:20 PM

Previous topic - Next topic

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...



http://artfulcode.net\">Artful code

Lutz

#1
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">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.